Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- natValue :: forall (n :: Nat) a. (KnownNat n, Num a) => a
- natValue' :: forall (n :: Nat). KnownNat n => Word
- type Index (n :: Nat) (l :: [k]) = Index' n l l
- type family Concat (xs :: [k]) (ys :: [k]) :: [k] where ...
- type family Length (xs :: [k]) :: Nat where ...
- type family Product (xs :: [Type]) (ys :: [Type]) :: [Type] where ...
- type family Remove (a :: k) (l :: [k]) :: [k] where ...
- type family Nub (l :: [k]) :: [k] where ...
- type family Reverse (l :: [k]) :: [k] where ...
- type IndexOf (x :: k) (xs :: [k]) = IndexOf' (MaybeIndexOf x xs) x xs
- type family MaybeIndexOf (a :: k) (l :: [k]) where ...
- type family Member x xs :: Constraint where ...
- type family InsertAt (n :: Nat) (l :: [k]) (l2 :: [k]) :: [k] where ...
- type family ReplaceAt (n :: Nat) (l :: [k]) (l2 :: [k]) :: [k] where ...
- type family IndexesOf (a :: k) (l :: [k]) :: [Nat] where ...
- type family ReplaceN (n :: Nat) (t :: k) (l :: [k]) :: [k] where ...
- type family ReplaceNS (ns :: [Nat]) (t :: k) (l :: [k]) :: [k] where ...
- type family Complement (xs :: [k]) (ys :: [k]) :: [k] where ...
- type family RemoveAt (n :: Nat) (l :: [k]) :: [k] where ...
- type family RemoveAt1 (n :: Nat) (l :: [k]) :: [k] where ...
- type family Tail (xs :: [k]) :: [k] where ...
- type Constraint = CONSTRAINT LiftedRep
- type family ConstraintAll1 (f :: k -> Constraint) (xs :: [k]) :: Constraint where ...
Documentation
type IndexOf (x :: k) (xs :: [k]) = IndexOf' (MaybeIndexOf x xs) x xs Source #
Get the first index of a type
type family MaybeIndexOf (a :: k) (l :: [k]) where ... Source #
Get the first index (starting from 1) of a type or 0 if none
MaybeIndexOf x xs = MaybeIndexOf' 0 x xs |
type family Member x xs :: Constraint where ... Source #
Constraint: x member of xs
type family ReplaceAt (n :: Nat) (l :: [k]) (l2 :: [k]) :: [k] where ... Source #
replace l[n] with l2 (folded)
type family IndexesOf (a :: k) (l :: [k]) :: [Nat] where ... Source #
Get all the indexes of a type
IndexesOf x xs = IndexesOf' 0 x xs |
type family ReplaceN (n :: Nat) (t :: k) (l :: [k]) :: [k] where ... Source #
replace a type at offset n in l
type family ReplaceNS (ns :: [Nat]) (t :: k) (l :: [k]) :: [k] where ... Source #
replace types at offsets ns in l
type family Complement (xs :: [k]) (ys :: [k]) :: [k] where ... Source #
Complement xs ys
Complement xs '[] = xs | |
Complement xs (y : ys) = Complement (Remove y xs) ys |
type family RemoveAt1 (n :: Nat) (l :: [k]) :: [k] where ... Source #
Remove a type at index (0 == don't remove)
type Constraint = CONSTRAINT LiftedRep #
The kind of lifted constraints
type family ConstraintAll1 (f :: k -> Constraint) (xs :: [k]) :: Constraint where ... Source #
Build a list of constraints e.g., ConstraintAll1 Eq '[A,B,C] ==> (Eq A, Eq B, Eq C)
ConstraintAll1 f '[] = () | |
ConstraintAll1 f (x ': xs) = (f x, ConstraintAll1 f xs) |