[GHC] #12187: Clarify the scoping of existentials for pattern synonym signatures
GHC
ghc-devs at haskell.org
Fri Jun 24 10:41:17 UTC 2016
#12187: Clarify the scoping of existentials for pattern synonym signatures
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
| PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #12108 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by simonpj:
@@ -24,1 +24,1 @@
- This kind of problem is related to #12108
+ This kind of problem is related to #12108, #12179
New description:
What are scoping rules for type variables in pattern synonym signatures?
We said that existentials variables are scoped as follows:
1. Existentials scope over only the provided constraints and the
arguments, not over the result type.
{{{
type Disguised a b = b -> RP a
pattern Q :: () => Eq b => Disguised a b
}}}
However, Simon argues that `Q` should be accepted as if we expand the
type synonym then the existentially quantified `b` is no longer in the
result type.
Richard disagrees, he considers the result type to be `Disguised a b` and
so `b` is in the result type and not in-scope. Therefore he wishes to
reject this example.
The purpose of this ticket is to decide the fate of `Q`.
This kind of problem is related to #12108, #12179
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12187#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list