Module

Type.Prelude

Package
purescript-typelevel-prelude
Repository
purescript/purescript-typelevel-prelude

Re-exports from Type.Data.Boolean

#True Source

data True :: Boolean

Instances

#False Source

data False :: Boolean

Instances

#BProxy Source

data BProxy (bool :: Boolean)

Value proxy for Boolean types

Constructors

#IsBoolean Source

class IsBoolean (bool :: Boolean)  where

Class for reflecting a type level Boolean at the value level

Members

Instances

#reifyBoolean Source

reifyBoolean :: forall r. Boolean -> (forall o. IsBoolean o => BProxy o -> r) -> r

Use a value level Boolean as a type-level Boolean

#Boolean Source

data Boolean :: Type

Re-exports from Type.Data.Ordering

#OProxy Source

data OProxy (ordering :: Ordering)

Value proxy for Ordering types

Constructors

#IsOrdering Source

class IsOrdering (ordering :: Ordering)  where

Class for reflecting a type level Ordering at the value level

Members

Instances

#reifyOrdering Source

reifyOrdering :: forall r. Ordering -> (forall o. IsOrdering o => OProxy o -> r) -> r

Use a value level Ordering as a type-level Ordering

#Ordering Source

data Ordering :: Type

Re-exports from Type.Data.Symbol

#SProxy Source

data SProxy (sym :: Symbol)

A value-level proxy for a type-level symbol.

Constructors

#AppendSymbol Source

class AppendSymbol (lhs :: Symbol) (rhs :: Symbol) (out :: Symbol) | lhs rhs -> out

Append two Symbol types together

#CompareSymbol Source

class CompareSymbol (lhs :: Symbol) (rhs :: Symbol) (out :: Ordering) | lhs rhs -> out

Compare two Symbol types

#IsSymbol Source

class IsSymbol (sym :: Symbol)  where

A class for known symbols

Members

Instances

#reifySymbol Source

reifySymbol :: forall r. String -> (forall sym. IsSymbol sym => SProxy sym -> r) -> r

#compareSymbol Source

compareSymbol :: forall o r l. CompareSymbol l r o => SProxy l -> SProxy r -> OProxy o

#appendSymbol Source

appendSymbol :: forall o r l. AppendSymbol l r o => SProxy l -> SProxy r -> SProxy o

Re-exports from Type.Equality

#TypeEquals Source

class TypeEquals a b | a -> b, b -> a where

This type class asserts that types a and b are equal.

The functional dependencies and the single instance below will force the two type arguments to unify when either one is known.

Note: any instance will necessarily overlap with refl below, so instances of this class should not be defined in libraries.

Members

Instances

Re-exports from Type.Proxy

Re-exports from Type.Row

#RProxy Source

data RProxy (row :: Row Type)

Constructors

#RLProxy Source

data RLProxy (rowList :: RowList)

Constructors

#ListToRow Source

class ListToRow (list :: RowList) (row :: Row Type) | list -> row

Convert a RowList to a row of types. The inverse of this operation is RowToList.

Instances

#RowLacks Source

class RowLacks (key :: Symbol) (row :: Row Type) 

Encodes the constraint that a given row does not contain a specific key.

#RowToList Source

class RowToList (row :: Row Type) (list :: RowList) | row -> list

Extract the collection of entries in a closed row of types. The list of entries is sorted by label and preserves duplicates. The inverse of this operation is ListToRow. Solved by the compiler.