Safe Haskell | None |
---|
- data HList where
- class HLength xs where
- class List2HList x xs where
- list2hlist :: [x] -> HList (x : xs)
- class ConstraintBox box a where
- box :: a -> box
- unsafeUnbox :: box -> a
- class Downcast h box where
- downcast :: h -> [box]
- downcastAs :: (a -> box) -> h -> [box]
- data ShowBox = forall a . Show a => ShowBox !a
- data AnyBox = forall a . AnyBox !a
- type family HCons x xs :: *
- type family UnHList xs :: [a]
- type family Distribute xs t :: [b]
- type family Replicate n x :: [a]
- type family Map f xs :: [a]
- type family Reverse xs :: [a]
- type family xs :! i :: a
- type family xs (++) ys :: [a]
- type family f ($) a :: b
- type family Concat xs :: [a]
- type family Length xs :: Nat
- data Nat1
- type family ToNat1 n :: Nat1
- type family FromNat1 n :: Nat
Heterogenous List
The heterogenous list
(Eq x, Eq (HList xs)) => Eq (HList (: * x xs)) | |
Eq (HList ([] *)) | |
(Ord x, Ord (HList xs)) => Ord (HList (: * x xs)) | |
Ord (HList ([] *)) | |
(Show x, Show (HList xs)) => Show (HList (: * x xs)) | |
Show (HList ([] *)) | |
(Monoid x, Monoid (HList xs)) => Monoid (HList (: * x xs)) | |
Monoid (HList ([] *)) | |
HLength (HList xs) => HLength (HList (: * x xs)) | |
HLength (HList ([] *)) | |
(ConstraintBox box x, Downcast (HList xs) box) => Downcast (HList (: * x xs)) box | |
Downcast (HList ([] *)) a |
Used only for the HList class to determine its length
class List2HList x xs whereSource
For construction from lists
list2hlist :: [x] -> HList (x : xs)Source
List2HList x ([] *) | |
List2HList x xs => List2HList x (: * x xs) |
Downcasting
class Downcast h box whereSource
downcastAs :: (a -> box) -> h -> [box]Source
Boxes
Use this box unless you know for certain that your types won't have a show instance.
Show ShowBox | |
Show a => ConstraintBox ShowBox a |
Type functions
HList
Type Lists
type family Distribute xs t :: [b]Source