[GHC] #8968: Pattern synonyms and GADTs

GHC ghc-devs at haskell.org
Fri Apr 11 05:59:45 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 kosmikus):

 Oh, I forgot. What does this then imply for explicit type signature on
 pattern synonyms? Do you propose to still allow
 {{{
 pattern D :: a -> T (Maybe a) b
 pattern D x = MkT (Just x)
 }}}
 (arguing that the "expression type" is easy to infer) or should the user
 also be forced to write
 {{{
 pattern D :: (b ~ Bool) => a -> T (Maybe a) b
 pattern D x = MkT (Just x)
 }}}
 ?

 I think the latter would certainly be more consistent then?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8968#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list