
#10928: Refine pattern synonym signatures -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): While we're changing the parser, we should make sure that explicit quantification is allowed. For example, {{{ pattern P :: forall a b. ... => forall c d. ... => .... }}} should introduce `a` and `b` as universals, and `c` and `d` as existentials. The existentials should scope over the provided constraints and the arguments, but not the result. The universals scope over the whole shebang. These should also be made available as scoped type variables in the pattern definition. There are four places where these variables might be in scope, labeled below: {{{ pattern P = (1) pattern P <- (2) pattern P (3) ... ... where P = (4) }}} The universals should be in scope everywhere. The existentials should be in scope only in `(3)` and `(4)`, I believe, but I'm really quite unsure. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10928#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler