[GHC] #5927: A type-level "implies" constraint on Constraints

GHC ghc-devs at haskell.org
Wed Aug 24 15:56:11 UTC 2016


#5927: A type-level "implies" constraint on Constraints
-------------------------------------+-------------------------------------
        Reporter:  illissius         |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  7.4.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Iceland_jack):

 Would there be a difference between

 {{{#!hs
 data Some :: (Type -> Constraint) -> Type where
   Some :: c a => a -> Some c
 }}}

 and

 {{{#!hs
 data Some' :: (Type -> Constraint) -> Type where
   Some' :: (ctx `Implies` c, c a) => a -> Some' ctx
 }}}

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


More information about the ghc-tickets mailing list