3 ms·
Alternatively, sh-4.3~$ ghc -Wall -Werror test.hs [1 of 1] Compiling Main ( test.hs, test.o ) test.hs:1:1: Warning: Top-level
by dllthomas 12y ago
Alternatively,
sh-4.3~$ ghc -Wall -Werror test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
test.hs:1:1: Warning:
Top-level binding with no type signature: main :: IO ()
test.hs:3:16: Warning:
This binding for `x' shadows the existing binding
bound at test.hs:1:12
test.hs:3:16: Warning: Defined but not used: `x'
<no location info>:
Failing due to -Werror.
- VMG 12y agoThis is where it gets weird on my system sh-4.3$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.3 sh-4.3$ ghc -Wall -Werror test.hs sh-4.3$ Arch Linux 64bit. It works as expected with runhaskell though Edit: see answer below, thanks dilthomas!
- dllthomas 12y agoTry touching test.hs (or add -fforce-recomp). By default, ghc won't rebuild if the object is newer than the source.
- luchs 12y agoBut it doesn't break because of the "Non-exhaustive patterns in case" that causes the runtime failure? These things look like they can be fixed without touching the case statement.