[GHC] #3645: Layout and pragmas
GHC
cvs-ghc at haskell.org
Mon Dec 13 21:00:16 CET 2010
#3645: Layout and pragmas
----------------------------------+-----------------------------------------
Reporter: igloo | Owner:
Type: feature request | Status: patch
Priority: normal | Milestone: 7.0.1
Component: Compiler (Parser) | Version: 6.10.4
Keywords: | Testcase:
Blockedby: | Difficulty: Unknown
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------+-----------------------------------------
Comment(by michalt):
What do you mean redundant? Example:
{{{
{-# LANGUAGE EmptyDataDecls
, DeriveDataTypeable
#-}
module Foo where
import Data.Typeable
data Test = Test
deriving (Typeable)
}}}
With
{{{
"#-}" { endPrag }
\n"#-}" { endPrag }
}}}
I'm getting:
{{{
Test.hs:2:14:
Cannot parse LANGUAGE pragma
Expecting comma-separated list of language options,
each starting with a capital letter
E.g. {-# LANGUAGE RecordPuns, Generics #-}
}}}
And with
{{{
$whitechar* "#-}" { endPrag }
}}}
It compiles just fine.
Also I'm really not convinced that it should be `lexToken` to match the
closing.
After all this function doesn't really match any actual tokens - it just
checks
for lexing errors/eof, updates lexer state, etc.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3645#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list