Ticket #3540 (closed merge: fixed)
Parser accepts malformed types with implicit parameters
| Reported by: | benl | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.12 branch |
| Component: | Compiler (Parser) | Version: | 6.11 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | typecheck/should_fail/T3540 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
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:
benl@humboldt:~$ cat tmp/Main.hs main = undefined thing :: (?dude :: Int) -> Int thing = undefined benl@humboldt:~$ hlint tmp/Main.hs hlint: src/Language/Haskell/Exts/ParseUtils.hs:(841,18)-(863,53): Non-exhaustive patterns in case
Change History
Note: See
TracTickets for help on using
tickets.
