
#15050: ScopedTypeVariables could allow more programs -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1 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 nomeata):
This is a consequence of the fact that a scoped type variable must be a variable, never a type. Another way of saying this is that a type variable brought into scope in a pattern type annotation simply names an existing type variable; it can't, say, bind a type variable to a type.
TBH, I don’t understand that part of the docs for `ScopedTypeVariables`. What does it mean for a type variable to be a type variable? Is there a global set of variables in existing? Is it referring to the variables in the signature of of the constructor? … I guess the latter could be, but I agree with your sentiment that that is pretty odd and unsatisfying, especially given the type variables in the type signature of the constructor are not in scope here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15050#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler