Module

Typisch.Row

Package
purescript-typisch
Repository
garganscript/purescript-typisch

#Lacks Source

class Lacks :: Symbol -> Row Type -> Constraintclass (IsSymbol label, Lacks label row) <= Lacks (label :: Symbol) (row :: Row Type) 

A version of Prim.Row.Lacks that infers Data.Symbol.IsSymbol for you to ease record modification.

Instances

#Cons Source

class Cons :: Symbol -> Type -> Row Type -> Row Type -> Constraintclass (Lacks label tail, Cons label a tail row) <= Cons (label :: Symbol) (a :: Type) (tail :: Row Type) (row :: Row Type) | label a tail -> row, label row -> a tail

A version of Prim.Row.Cons that infers Data.Symbol.IsSymbol and Prim.Row.Lacks for you to ease record modification.

Instances

  • (Lacks label tail, Cons label a tail row) => Cons label a tail row

#Cons2 Source

class Cons2 :: Symbol -> Type -> Symbol -> Type -> Row Type -> Row Type -> Row Type -> Constraintclass (Lacks labelB base, Cons labelA a base rowA, Cons labelB b rowA rowAB) <= Cons2 (labelA :: Symbol) (a :: Type) (labelB :: Symbol) (b :: Type) (base :: Row Type) (rowA :: Row Type) (rowAB :: Row Type) | labelA a base -> rowA, labelB b rowA -> rowAB, labelB b rowAB -> rowA, labelA a rowA -> base

Cons, but for two items.

Instances

  • (Lacks labelB base, Cons labelA a base rowA, Cons labelB b rowA rowAB) => Cons2 labelA a labelB b base rowA rowAB

#Cons3 Source

class Cons3 :: Symbol -> Type -> Symbol -> Type -> Symbol -> Type -> Row Type -> Row Type -> Row Type -> Row Type -> Constraintclass (Lacks labelB base, Lacks labelC base, Cons labelA a base rowA, Cons labelB b rowA rowAB, Cons labelC c rowAB rowABC) <= Cons3 (labelA :: Symbol) (a :: Type) (labelB :: Symbol) (b :: Type) (labelC :: Symbol) (c :: Type) (base :: Row Type) (rowA :: Row Type) (rowAB :: Row Type) (rowABC :: Row Type) | labelA a base -> rowA, labelB b rowA -> rowAB, labelC c rowAB -> rowABC, labelC c rowABC -> rowAB, labelB b rowAB -> rowA, labelA a rowA -> base

Cons, but for threeitems.

Instances

  • (Lacks labelB base, Lacks labelC base, Cons labelA a base rowA, Cons labelB b rowA rowAB, Cons labelC c rowAB rowABC) => Cons3 labelA a labelB b labelC c base rowA rowAB rowABC

#Changes Source

class Changes :: Symbol -> Type -> Type -> Row Type -> Row Type -> Row Type -> Constraintclass (Cons label a tail rowA, Cons label b tail rowB) <= Changes (label :: Symbol) (a :: Type) (b :: Type) (tail :: Row Type) (rowA :: Row Type) (rowB :: Row Type) | label a tail -> rowA, label b tail -> rowB, label rowA -> a tail, label rowB -> b tail

A class that represents changing the type of a label in a row.

Instances

  • (Cons label a tail rowA, Cons label b tail rowB) => Changes label a b tail rowA rowB

#Replaces Source

class Replaces :: Symbol -> Type -> Symbol -> Type -> Row Type -> Row Type -> Row Type -> Constraintclass (Cons labelA a tail rowA, Cons labelB b tail rowB) <= Replaces (labelA :: Symbol) (a :: Type) (labelB :: Symbol) (b :: Type) (tail :: Row Type) (rowA :: Row Type) (rowB :: Row Type) | labelA a tail -> rowA, labelB b tail -> rowB, labelA rowA -> a tail, labelB rowB -> b tail

A class that represents replacing a row entry with another one.

Instances

  • (Cons labelA a tail rowA, Cons labelB b tail rowB) => Replaces labelA a labelB b tail rowA rowB

Re-exports from Prim.Row

#Nub

class Nub (original :: Row k) (nubbed :: Row k) | original -> nubbed

The Nub type class is used to remove duplicate labels from rows.

#Union

class Union (left :: Row k) (right :: Row k) (union :: Row k) | left right -> union, right union -> left, union left -> right

The Union type class is used to compute the union of two rows of types (left-biased, including duplicates).

The third type argument represents the union of the first two.

Modules
Typisch.Row