Module

Type.Quotient

Package
purescript-quotient
Repository
rightfold/purescript-quotient

Approximation of quotient types.

#Canonical Source

class Canonical a e | e -> a where

Equivalence relation disguised as a canonicalization function.

Members

Instances

#Quotient Source

newtype Quotient a e

Quotient type with equivalence relation e. The runtime representation is identical to that of a.

#type (/) Source

Operator alias for Type.Quotient.Quotient (left-associative / precedence 9)

#mkQuotient Source

mkQuotient :: forall e a. a -> a / e

Pair a value with an equivalence relation.

#runQuotient Source

runQuotient :: forall e a. Canonical a e => a / e -> a

Canonicalize a value using an equivalence relation such that the caller cannot observe distinct wrappees.

#Id Source

data Id :: Type

T / Id ~ T.

Instances

#Abs Source

data Abs :: Type

Negative values are equivalent to their positive counterparts.

Instances

#Mod Source

data Mod :: Nat1 -> Type

Integers modulo some positive number.

Instances