hawk icon indicating copy to clipboard operation
hawk copied to clipboard

unhelpful error when missing language extensions

Open gelisam opened this issue 10 years ago • 0 comments

$ echo "data Foo = forall a. Foo a" > ~/.hawk/prelude.hs
$ hawk '"hello"'
error parsing file /Users/gelisam/.hawk/prelude.hs:SrcLoc {srcFilename = "/Users/gelisam/.hawk/prelude.hs", srcLine = 3, srcColumn = 20}: Illegal data/newtype declaration

GHC gives a much better error message:

$ ghc ~/.hawk/prelude.hs
/Users/gelisam/.hawk/prelude.hs:1:12:
    Not a data constructor: `forall'
    Perhaps you intended to use -XExistentialQuantification

gelisam avatar Oct 25 '14 12:10 gelisam