Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data ListType w lt where
- NilListType :: ListType w '[]
- ConsListType :: w a -> ListType w lt -> ListType w (a ': lt)
- assembleListType :: [Some w] -> Some (ListType w)
- mapMListType :: Applicative m => (forall t'. wita t' -> m (witb t')) -> ListType wita t -> m (ListType witb t)
- joinMListType :: Applicative m => (forall t'. wita t' -> witb t' -> m (witc t')) -> ListType wita t -> ListType witb t -> m (ListType witc t)
- mapListType :: (forall t'. wita t' -> witb t') -> ListType wita t -> ListType witb t
- joinListType :: (forall t'. wita t' -> witb t' -> witc t') -> ListType wita t -> ListType witb t -> ListType witc t
- pairListType :: ListType wita t -> ListType witb t -> ListType (PairType wita witb) t
- listTypeLength :: ListType w lt -> Int
- listTypeToList :: (forall a. w a -> r) -> ListType w t -> [r]
- listTypeFor :: Applicative m => ListType w t -> (forall a. w a -> m r) -> m [r]
- listTypeFor_ :: Applicative m => ListType w t -> (forall a. w a -> m ()) -> m ()
- listTypeLengthType :: ListType w lt -> PeanoNatType (ListLength lt)
- listTypeToFixedList :: (forall a. w a -> r) -> ListType w t -> FixedList (ListLength t) r
- listTypeFromFixedList :: FixedList n (Some w) -> (forall t. n ~ ListLength t => ListType w t -> r) -> r
Documentation
data ListType w lt where Source #
a witness type for lists of types
The w
parameter is the witness type of the elements.
NilListType :: ListType w '[] | |
ConsListType :: w a -> ListType w lt -> ListType w (a ': lt) |
Instances
TestEquality w => TestEquality (ListType w :: [k] -> Type) Source # | |
Defined in Data.Type.Witness.Specific.List.List | |
Representative w => Representative (ListType w :: [k] -> Type) Source # | |
Defined in Data.Type.Witness.Specific.List.List getRepWitness :: Subrepresentative (ListType w) (ListType w) Source # | |
Representative w => Is (ListType w :: [k] -> Type) ('[] :: [k]) Source # | |
Defined in Data.Type.Witness.Specific.List.List representative :: ListType w '[] Source # | |
(Is w a2, Is (ListType w) lt) => Is (ListType w :: [a1] -> Type) (a2 ': lt :: [a1]) Source # | |
Defined in Data.Type.Witness.Specific.List.List representative :: ListType w (a2 ': lt) Source # | |
(forall (a :: k). Show (w a)) => Show (ListType w lt) Source # | |
mapMListType :: Applicative m => (forall t'. wita t' -> m (witb t')) -> ListType wita t -> m (ListType witb t) Source #
joinMListType :: Applicative m => (forall t'. wita t' -> witb t' -> m (witc t')) -> ListType wita t -> ListType witb t -> m (ListType witc t) Source #
mapListType :: (forall t'. wita t' -> witb t') -> ListType wita t -> ListType witb t Source #
joinListType :: (forall t'. wita t' -> witb t' -> witc t') -> ListType wita t -> ListType witb t -> ListType witc t Source #
listTypeLength :: ListType w lt -> Int Source #
listTypeToList :: (forall a. w a -> r) -> ListType w t -> [r] Source #
listTypeFor :: Applicative m => ListType w t -> (forall a. w a -> m r) -> m [r] Source #
listTypeFor_ :: Applicative m => ListType w t -> (forall a. w a -> m ()) -> m () Source #
listTypeLengthType :: ListType w lt -> PeanoNatType (ListLength lt) Source #
listTypeToFixedList :: (forall a. w a -> r) -> ListType w t -> FixedList (ListLength t) r Source #
listTypeFromFixedList :: FixedList n (Some w) -> (forall t. n ~ ListLength t => ListType w t -> r) -> r Source #