[GHC] #8968: Pattern synonyms and GADTs
GHC
ghc-devs at haskell.org
Tue Apr 8 13:38:42 UTC 2014
#8968: Pattern synonyms and GADTs
----------------------------------------------+----------------------------
Reporter: kosmikus | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version:
Resolution: | 7.8.1-rc2
Operating System: Unknown/Multiple | Keywords:
Type of failure: GHC rejects valid program | Architecture:
Test Case: | Unknown/Multiple
Blocking: | Difficulty: Unknown
| Blocked By:
| Related Tickets:
----------------------------------------------+----------------------------
Comment (by cactus):
We don't have frontend support for pattern synonym signatures (see #8584).
However, this can be worked around using the technique described in #8584,
so I was able to get your code to typecheck by modifying it as:
{{{
{-# LANGUAGE GADTs, KindSignatures, PatternSynonyms, ScopedTypeVariables
#-}
data X :: (* -> *) -> * -> * where
Y :: f Int -> X f Int
pattern C x = (Y (Just x) :: X Maybe Int)
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8968#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list