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.

Instances

#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

#Mod2 Source

data Mod2 :: Type

Non-negative integers modulo 2.

Instances

#Mod4 Source

data Mod4 :: Type

Non-negative integers modulo 4.

Instances

#Mod8 Source

data Mod8 :: Type

Non-negative integers modulo 8.

Instances

#Mod16 Source

data Mod16 :: Type

Non-negative integers modulo 16.

Instances

#Mod32 Source

data Mod32 :: Type

Non-negative integers modulo 32.

Instances

#Mod64 Source

data Mod64 :: Type

Non-negative integers modulo 64.

Instances

#Mod128 Source

data Mod128 :: Type

Non-negative integers modulo 128.

Instances

#Mod256 Source

data Mod256 :: Type

Non-negative integers modulo 256.

Instances

#Mod512 Source

data Mod512 :: Type

Non-negative integers modulo 512.

Instances

#Mod1024 Source

data Mod1024 :: Type

Non-negative integers modulo 1024.

Instances

Modules
Type.Quotient