Author
anonymous
over 3 years ago
Language
Haskell
Compiler
ghc 8.4.2
Options
Warnings
Author
anonymous
over 3 years ago
$ ghc prog.hs -o prog.exe -Wall
[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:1:1: warning: [-Wunused-imports]
The import of ‘Data.Char’ is redundant
except perhaps to import instances from ‘Data.Char’
To import instances alone, use: import Data.Char()
|
1 | import Data.Char
| ^^^^^^^^^^^^^^^^
prog.hs:4:8: warning: [-Wtype-defaults]
• Defaulting the following constraints to type ‘Integer’
(Show a0) arising from a use of ‘print’ at prog.hs:4:8-33
(Eq a0) arising from a use of ‘make9’ at prog.hs:4:16-33
(Num a0) arising from a use of ‘make9’ at prog.hs:4:16-33
• In the expression: print $ make9 [0, 1, 1, 0]
In an equation for ‘main’: main = print $ make9 [0, 1, 1, ....]
|
4 | main = print $ make9 [0, 1, 1, 0]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
prog.hs:6:1: warning: [-Wunused-top-binds]
Defined but not used: type constructor or class ‘Bit’
|
6 | type Bit = Int
| ^^^^^^^^^^^^^^
prog.hs:8:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature:
make8 :: Num a => [a] -> [a]
|
8 | make8 bits = take 8 (bits ++ repeat 0)
| ^^^^^
prog.hs:10:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature:
make9 :: (Eq a, Num a) => [a] -> [a]
|
10 | make9 bits | odd $ length $ filter (/=0) bits = make8 (bits ++ repeat 0) ++ [1]
| ^^^^^
Linking prog.exe ...
[0,1,1,0,0,0,0,0,0]
Exit Code:
0