
#13770: HEAD: Type mentioned in error won't show up in pattern signature -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Yes, this is a tidying problem. The `PatSkol` constructor does not carry a tidy-able type. It should be treated more like `SigSkol`. But what do we ''want'' the error message to say? Consider {{{ data T a where MkT :: a -> b -> T a f :: T [p] -> Int f (MkT x y) = ... }}} Now, if there is an error in the `...`, involving the skolem `b` bound by the `(MkT x y)` pattern, would we like this? {{{ 'b4' is a rigid type variable bound by a pattern with constructor: MkT :: [p] -> b4 -> T [p] }}} Notice that I have instantiated the universal argument too... I see no alternative to doing so. To be comprehensible we must instantiate the existential argument to match the one reported (remember there may be many nested `MkT` matches). That's what I propose. Sound ok? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13770#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler