
#11524: Something is amiss with quantification in pattern synonym type signatures -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): If I understand pattern signatures correctly, it's a bug in the pretty- printer. Here is the correct version with explicit quantification: {{{ pattern PApp :: forall k2 (fun :: k2). () => forall k1 (a :: k1 -> k2) (b :: k1). (fun ~ a b) => AType a -> AType b -> AType fun }}} Note that `k2` and `fun` are universal, while `k1`, `a`, and `b` are existential. And indeed this signature is accepted. Two problems remain: 1. That error message is unhelpful. I imagine we can do better. 2. The pretty-printer should put the existentials in the right spot. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11524#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler