#3540: Parser accepts malformed types with implicit parameters
-----------------------------+----------------------------------------------
Reporter: benl | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Parser)
Version: 6.11 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
The parser in GHC 6.11 currently accepts this:
{{{
thing :: (?dude :: Int) -> Int
thing = undefined
}}}
Where the type should really be written with => like
{{{
thing :: (?dude :: Int) => Int
thing = undefined
}}}
Running hlint on the malformed-but-accepted-by-GHC version crashes
haskell-src-exts:
{{{
b...@humboldt:~$ cat tmp/Main.hs
main = undefined
thing :: (?dude :: Int) -> Int
thing = undefined
b...@humboldt:~$ hlint tmp/Main.hs
hlint: src/Language/Haskell/Exts/ParseUtils.hs:(841,18)-(863,53): Non-
exhaustive patterns in case
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3540>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs