Module

Type.Data.List

Package
purescript-typelevel-lists
Repository
PureFunctor/purescript-typelevel-lists

Type-level heterogenous list of kinds for PureScript

#Cons' Source

data Cons' :: forall k. k -> List' k -> List' k

Prepends an item to a List', creating a new List'.

Instances

#List' Source

data List' :: forall k. k -> Typedata List' k

Represents a type-level list.

#ListProxy Source

data ListProxy :: forall k. List' k -> Typedata ListProxy l

A value-level proxy for List'

Constructors

#Nil' Source

data Nil' :: forall k. List' k

Represents an empty List'.

Instances

#type (:>) Source

Operator alias for Type.Data.List.Cons' (right-associative / precedence 1)

#Concat Source

class Concat :: forall k. List' k -> List' k -> List' k -> Constraintclass Concat xs ys zs | xs ys -> zs where

Concatenates two List's together.

Members

  • concat :: forall lproxy. lproxy xs -> lproxy ys -> lproxy zs

Instances

#Drop Source

class Drop :: forall k. Int -> List' k -> List' k -> Constraintclass Drop n xs ys | n xs -> ys where

Drops an n amount of items from a List'.

Members

  • drop :: forall lproxy iproxy. iproxy n -> lproxy xs -> lproxy ys

Instances

#Fold Source

class Fold :: forall k. (k -> k -> k) -> k -> List' k -> k -> Constraintclass Fold f z xs r | f z xs -> r where

Folds a List' into a singular value, left-associative.

Members

  • fold :: forall fproxy kproxy lproxy. fproxy f -> kproxy z -> lproxy xs -> kproxy r

Instances

#Foldr Source

class Foldr :: forall k. (k -> k -> k) -> k -> List' k -> k -> Constraintclass Foldr f z xs r | f z xs -> r where

Folds a List' into a singular value, right-associative.

Members

  • foldr :: forall fproxy kproxy lproxy. fproxy f -> kproxy z -> lproxy xs -> kproxy r

Instances

#Init Source

class Init :: forall k. List' k -> List' k -> Constraintclass Init xs ys | xs -> ys where

Takes the init items of a List'.

Members

  • init :: forall lproxy. lproxy xs -> lproxy ys

Instances

#Init' Source

class Init' :: forall k. k -> List' k -> List' k -> Constraintclass Init' xs ys zs | xs ys -> zs

Internal type class that acts as an accumulator.

Instances

#IsEmpty Source

class IsEmpty :: forall k. List' k -> Boolean -> Constraintclass IsEmpty xs r | xs -> r where

Determines whether List' is empty.

Members

Instances

#IsMember Source

class IsMember :: forall k. k -> List' k -> Boolean -> Constraintclass IsMember x xs r | x xs -> r where

Performs membership testing given an item and a List'.

Members

Instances

#Last Source

class Last :: forall k. List' k -> k -> Constraintclass Last xs x | xs -> x where

Returns the last item of a List'.

Members

Instances

#Length Source

class Length :: forall k. List' k -> Int -> Constraintclass Length xs r | xs -> r where

Computes the length of a List' as a Type.Data.Peano.Int

Members

  • length :: forall lproxy iproxy. lproxy xs -> iproxy r

Instances

#Length' Source

class Length' :: forall k. List' k -> Int -> Int -> Constraintclass Length' xs n r | xs n -> r

Internal type that acts as an accumulator

Instances

#Map Source

class Map :: forall k l. (k -> l) -> List' k -> List' l -> Constraintclass Map f xs ys | f xs -> ys where

Maps a type constructor to a List'.

Members

  • map :: forall fproxy kproxy lproxy. fproxy f -> kproxy xs -> lproxy ys

Instances

#Take Source

class Take :: forall k. Int -> List' k -> List' k -> Constraintclass Take n xs ys | n xs -> ys where

Takes an n amount of items from a List'.

Members

  • take :: forall lproxy iproxy. iproxy n -> lproxy xs -> lproxy ys

Instances

#Zip Source

class Zip :: forall k. List' k -> List' k -> List' k -> Constraintclass Zip x y z | x y -> z where

Zips together two List's.

Members

  • zip :: forall lproxy. lproxy x -> lproxy y -> lproxy z

Instances