[GHC] #9953: Pattern synonyms don't work with GADTs
GHC
ghc-devs at haskell.org
Thu Jan 8 12:16:27 UTC 2015
#9953: Pattern synonyms don't work with GADTs
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: cactus
Type: bug | Status: new
Priority: normal | Milestone: 7.10.1
Component: Compiler (Type | Version: 7.10.1-rc1
checker) | Keywords:
Resolution: | PatternSynonyms
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by simonpj):
Well Richard, you are proposing that you can write `P1`'s type signature
just like `T1`'s. Fair enough, I can see some merit; indeed it was my
initial position. But then you '''must''' write `P2`'s type signature in
some other way. What other way do you propose??
Since we already ''have'' two different ways to write the signature, we
are at liberty to decide that those two different ways define two
different behaviours; and that is what I am proposing. Yes, we could
invent a third way, but that introduces a whole new raft of complications.
(E.g. can you use that third way in a GADT declaration? For an ordinary
function? etc)
I'm totally open to considering alternative. But until we have one, let's
get on with implementing the proposal we have. That is often
illuminating; and if we come up with a better idea meanwhile we can retro-
fit it easily enough.
For data families, I think it should all work fine. But indeed we should
check.
Simon
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9953#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list