License | BSD3 |
---|---|
Maintainer | Brent Yorgey <byorgey@cis.upenn.edu> |
Stability | experimental |
Portability | non-portable (see .cabal) |
Safe Haskell | None |
Language | Haskell2010 |
Various types defined inductively as type families or data families on type-lists.
Synopsis
- type family Fun (xs :: [Type]) r
- data Tuple xs
- zeroT :: Tuple '[]
- oneT :: a -> Tuple '[a]
- (<+>) :: Tuple xs -> Tuple ys -> Tuple (xs :++: ys)
- runTuple :: Tuple xs -> Fun xs r -> r
- type family Map (f :: Type -> Type) (xs :: [Type]) :: [Type]
- class Distribute xs where
- distribute :: Functor f => f (Tuple xs) -> Tuple (Map f xs)
Functions
type family Fun (xs :: [Type]) r Source #
Curried functions. We have
Fun '[x1, ..., xn] r = x1 -> ... -> xn -> r
Tuples
Mapping and distributing over tuples
class Distribute xs where Source #
Instances
Distribute ([] :: [Type]) Source # | |
Defined in Data.Pattern.Base.Tuple | |
(Uncurriable t, Tupable t, Distribute t) => Distribute (h ': t) Source # | |
Defined in Data.Pattern.Base.Tuple |