[GHC] #2500: Unrecognised pragma complained about twice
GHC
trac at galois.com
Sun Aug 10 12:40:47 EDT 2008
#2500: Unrecognised pragma complained about twice
----------------------+-----------------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.10 branch
Component: Compiler | Version: 6.8.3
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------+-----------------------------------------------------
Comment (by igloo):
However, with this module:
{{{
module Foo where
w = ()
{-# FOO wibble #-}
f x = x
}}}
we get only one warning. I haven't checked, but I'm pretty sure that
what's happening here is that the first warning is given when we are
looking for OPTIONS and LANGUAGE pragmas, and the second warning is given
when we are actually parsing the module for real.
I don't think we should get rid of the first warning, e.g. with:
{{{
{-# OOPS_TYPO_LANGAUGE CPP #-}
module Foo where
z = ()
#if FOO
q = q
#else
w = w
#endif
}}}
it's the only one we get:
{{{
q.hs:2:0: Unrecognised pragma
q.hs:8:1: lexical error at character 'i'
}}}
But not giving the second warning is hard. Personally I'd be tempted to
leave things as they are; thoughts?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2500#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list