#6051: Parsing type constraints in GHC 7.4.1 -----------------------------------------------+---------------------------- Reporter: leepike | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.1 | Keywords: Os: Linux | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Testcase: Blockedby: | Blocking: Related: | -----------------------------------------------+---------------------------- This appears to be a parsing bug, or at least a bad error message, for a *malformed* type constraint:
Given the following malformed program, I get the following output loading it with ghci (GHC 7.4.1): ------------------------------------ {{{ module Test where data Foo a = Foo a -- Malformed! instance Ord a => Eq a => Show (Foo a) where show (Foo a) = undefined }}} ------------------------------------- {{{ $ ghci Test.hs GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Test ( Test.hs, interpreted ) *** Exception: compiler/rename/RnSource.lhs:429:14-81: Irrefutable pattern failed for pattern Data.Maybe.Just (inst_tyvars, _, SrcLoc.L _ cls, _) > }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6051> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs