[GHC] #10106: GHC doesn't warn on typos in language pragmas
GHC
ghc-devs at haskell.org
Sat Feb 21 17:17:12 UTC 2015
#10106: GHC doesn't warn on typos in language pragmas
-------------------------------------+-------------------------------------
Reporter: sdemos | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
Keywords: | Operating System: Linux
Architecture: | Type of failure: Incorrect
Unknown/Multiple | warning at compile-time
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
In particular, I was struggling with the QuasiQuotes language extension. I
had -
{{{#!hs
{-# LANGAUGE QuasiQuotes #-}
site = [shamelet|Hello World!|]
}}}
Notice the transposed A and U in `LANGUAGE`
The error that ghc was emitting was -
`Main.hs:23:47: parse error on input ‘]’`
It took me a long time and a lot of head-banging to figure out that it was
a typo in the language pragma, especially because the language pragma was
surrounded by other language pragmas and it was at the top of the file.
I would think that this should at least emit a warning when there is a
typo in a pragma.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10106>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list