Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Utils for type lists
- type family Map (f :: a -> k) (xs :: [a]) where ...
- type family Max (xs :: [Nat]) where ...
- type family Tail (xs :: [*]) where ...
- type family Drop (n :: Nat) (xs :: [*]) where ...
- type family Take (n :: Nat) (xs :: [*]) where ...
- type family Init (xs :: [*]) where ...
- type family Head (xs :: [*]) where ...
- type family Snoc (xs :: [*]) x where ...
- type family InsertAt (n :: Nat) l l2 where ...
- type family ReplaceAt (n :: Nat) l l2 where ...
- type family Replace t1 t2 l where ...
- type family ReplaceN n t l where ...
- type family ReplaceNS ns t l where ...
- type family Reverse (l :: [*]) where ...
- type family RemoveAt (n :: Nat) l where ...
- type family RemoveAt1 (n :: Nat) l where ...
- type family RemoveAtN (ns :: [Nat]) l where ...
- type family Concat (xs :: [*]) (ys :: [*]) where ...
- type family Length xs where ...
- type family Replicate n s where ...
- type family MapMaybe l where ...
- type family Generate (n :: Nat) (m :: Nat) :: [Nat] where ...
- type family IsMember a (l :: [*]) :: Bool where ...
- type family IsSubset l1 l2 :: Bool where ...
- type family Indexes (l :: [*]) where ...
- type family MapTest a (l :: [*]) where ...
- type family Zip (l :: [*]) (l2 :: [*]) where ...
- type family Filter a (l :: [*]) where ...
- type family Nub (l :: [*]) where ...
- type family NubHead (l :: [*]) where ...
- type family IndexOf a (l :: [*]) :: Nat where ...
- type family IndexesOf a (l :: [*]) :: [Nat] where ...
- type family MaybeIndexOf a (l :: [*]) where ...
- type family Index (n :: Nat) (l :: [*]) where ...
- type family Union (xs :: [*]) (ys :: [*]) where ...
- type Member x xs = (IsMember x xs ~ True, x ~ Index (IndexOf x xs) xs, KnownNat (IndexOf x xs))
- type CheckNub (l :: [*]) = CheckNubEx l (Nub l) ~ True
Documentation
type family Max (xs :: [Nat]) where ... Source #
Get the max of a list of Nats
Max (x ': xs) = Max' x xs |
type family Generate (n :: Nat) (m :: Nat) :: [Nat] where ... Source #
Generate a list of Nat [n..m-1]
type family IsMember a (l :: [*]) :: Bool where ... Source #
Check that a type is member of a type list
IsMember a l = IsMember' l a l |
type family IndexOf a (l :: [*]) :: Nat where ... Source #
Get the first index of a type
IndexOf x xs = IndexOf' x xs xs |
type family IndexesOf a (l :: [*]) :: [Nat] where ... Source #
Get all the indexes of a type
IndexesOf x xs = IndexesOf' 0 x xs |
type family MaybeIndexOf a (l :: [*]) where ... Source #
Get the first index (starting from 1) of a type or 0 if none
MaybeIndexOf x xs = MaybeIndexOf' 0 x xs |