TypeFun.Data.List

Primitive operations on lists

type family Length a :: N

type family Drop c s :: [k]

type family Take c s :: [k]

type family Delete a s :: [k]

type family Remove i a :: [k]

type family a :++: b :: [k]

Elements lookup

type IndexOf a s

type IndexOfMay a s

type family IndexOfMay' acc a s :: Maybe N

type family IndicesOfMay a b :: [Maybe N]

type family IndicesOf a b :: [N]

type Index idx s

type family IndexMay idx s :: Maybe k

type family IndicesMay idxs a :: [Maybe k]

type family Indices idxs a :: [k]

type Elem a s

type NotElem a s

type family Count a s :: N

Operations with lists

type family SubList a b :: Constraint

type family NotSubList a b :: Constraint

type IsPrefixOf a b

type IsNotPrefixOf a b

type family IsPrefixOfBool a b :: Bool

Set operations

type family Union a b :: [k]

type family UnionList l :: [k]

type family AppendUniq a s :: [k]

type Intersect a b

type family Substract a b :: [k]

Uniqueness checking

type ElementIsUniq a s

type UniqElements a

type family UniqElements' a self :: Constraint

Unsafe helpers

appendId

subListId