[GHC] #11693: Add `When` type family

GHC ghc-devs at haskell.org
Thu Mar 10 08:12:09 UTC 2016


#11693: Add `When` type family
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:
          Component:  Core           |           Version:  8.1
  Libraries                          |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Does a type family like `When` from
 [https://github.com/mikeizbicki/subhask/blob/master/src/SubHask/SubType.hs#L133
 here] belong somewhere in `Data.Types.*`

 {{{#!hs
 type family
   When (a :: Bool) (b :: Constraint) :: Constraint where
   When True  b = b
   When False b = ()
 }}}

 like [https://hackage.haskell.org/package/base/docs/Control-
 Monad.html#v:when when].

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


More information about the ghc-tickets mailing list