Module

Type.Quotient

Approximation of quotient types.

#Canonical

class Canonical a e | e -> a where

Equivalence relation disguised as a canonicalization function.

Members

Instances

#Quotient

newtype Quotient a e

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

Instances

#type (/)

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

#mkQuotient

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

Pair a value with an equivalence relation.

#runQuotient

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

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

#Id

data Id :: Type

T / Id ~ T.

Instances

#Abs

data Abs :: Type

Negative values are equivalent to their positive counterparts.

Instances

#Mod2

data Mod2 :: Type

Non-negative integers modulo 2.

Instances

#Mod4

data Mod4 :: Type

Non-negative integers modulo 4.

Instances

#Mod8

data Mod8 :: Type

Non-negative integers modulo 8.

Instances

#Mod16

data Mod16 :: Type

Non-negative integers modulo 16.

Instances

#Mod32

data Mod32 :: Type

Non-negative integers modulo 32.

Instances

#Mod64

data Mod64 :: Type

Non-negative integers modulo 64.

Instances

#Mod128

data Mod128 :: Type

Non-negative integers modulo 128.

Instances

#Mod256

data Mod256 :: Type

Non-negative integers modulo 256.

Instances

#Mod512

data Mod512 :: Type

Non-negative integers modulo 512.

Instances

#Mod1024

data Mod1024 :: Type

Non-negative integers modulo 1024.

Instances

Modules