[GHC] #12087: Inconsistency in GADTs?

GHC ghc-devs at haskell.org
Thu May 19 22:21:27 UTC 2016


#12087: Inconsistency in GADTs?
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  task           |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:  GADTs          |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{#!hs
 f :: Ord a => Eq a => a -> Bool
 f = …
 }}}

 this is allowed but not in GADTs

 {{{#!hs
 data F a where
   MkF :: Ord a => Eq a => a -> F a

 -- <interactive>:48:16: error:
 --     • Data constructor ‘MkF’ returns type ‘Eq a => a -> F a’
 --         instead of an instance of its parent type ‘F a’
 --     • In the definition of data constructor ‘MkF’
 --       In the data type declaration for ‘F’
 }}}

 not a big deal

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


More information about the ghc-tickets mailing list