TypeFun.Data.List

Primitive operations on lists

type family Length (a :: [k]) :: N where ...

type family Drop (c :: N) (s :: [k]) :: [k] where ...

type family Take (c :: N) (s :: [k]) :: [k] where ...

type family Delete (a :: k) (s :: [k]) :: [k] where ...

type family Remove (i :: N) (a :: [k]) :: [k] where ...

type family (a :: [k]) :++: (b :: [k]) :: [k] where ...

Elements lookup

type IndexOf a s

type IndexOfMay a s

type family IndexOfMay' (acc :: N) (a :: k) (s :: [k]) :: Maybe N where ...

type family IndicesOfMay (a :: [k]) (b :: [k]) :: [Maybe N] where ...

type family IndicesOf (a :: [k]) (b :: [k]) :: [N] where ...

type Index idx s

type family IndexMay (idx :: N) (s :: [k]) :: Maybe k where ...

type family IndicesMay (idxs :: [N]) (a :: [k]) :: [Maybe k] where ...

type family Indices (idxs :: [N]) (a :: [k]) :: [k] where ...

type Elem a s

type NotElem a s

type family Count (a :: k) (s :: [k]) :: N where ...

Operations with lists

type family SubList (a :: [k]) (b :: [k]) :: Constraint where ...

type family NotSubList (a :: [k]) (b :: [k]) :: Constraint where ...

type IsPrefixOf a b

type IsNotPrefixOf a b

type family IsPrefixOfBool (a :: [k]) (b :: [k]) :: Bool where ...

Set operations

type family Union (a :: [k]) (b :: [k]) :: [k] where ...

type family UnionList (l :: [[k]]) :: [k] where ...

type family AppendUniq (a :: k) (s :: [k]) :: [k] where ...

type Intersect a b

type family Substract (a :: [k]) (b :: [k]) :: [k] where ...

Uniqueness checking

type ElementIsUniq a s

type UniqElements a

type family UniqElements' (a :: [k]) (self :: [k]) :: Constraint where ...

Unsafe helpers

appendId

subListId