[GHC] #12002: Pragmas after a module declaration are ignored without warning.
GHC
ghc-devs at haskell.org
Sun May 1 16:46:59 UTC 2016
#12002: Pragmas after a module declaration are ignored without warning.
-------------------------------------+-------------------------------------
Reporter: seanparsons | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Other
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Normally pragmas are placed above the module declaration like so:
{{{#!hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
}}}
However if the above 2 lines are flipped around like this:
{{{#!hs
module Main where
{-# LANGUAGE OverloadedStrings #-}
}}}
Then the behaviour seen by a user is that equivalent to the pragma not
being present, because it would appear GHC ignores the multi-line comment
it looks like.
For a novice (I'm not one but it just tripped me up) this would be
incredibly baffling (it was for me), it would be nice to see a warning for
this at the least.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12002>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list