Module

Data.Variant.Internal

#VariantRep

newtype VariantRep a

Constructors

#VariantCase

#VariantFCase

data VariantFCase t0

#VariantTags

class VariantTags :: forall k. RowList k -> Constraintclass VariantTags rl  where

Members

Instances

#Contractable

class Contractable :: forall k. Row k -> Row k -> Constraintclass Contractable gt lt  where

Members

Instances

#VariantMatchCases

class VariantMatchCases :: RowList Type -> Row Type -> Type -> Constraintclass VariantMatchCases rl vo b | rl -> vo b

Instances

#VariantFMatchCases

class VariantFMatchCases :: RowList Type -> Row (Type -> Type) -> Type -> Type -> Constraintclass VariantFMatchCases rl vo a b | rl -> vo a b

Instances

#VariantMapCases

class VariantMapCases :: RowList Type -> Row Type -> Row Type -> Constraintclass VariantMapCases (rl :: RowList Type) (ri :: Row Type) (ro :: Row Type) | rl -> ri ro

Instances

#VariantFMapCases

class VariantFMapCases :: RowList Type -> Row (Type -> Type) -> Row (Type -> Type) -> Type -> Type -> Constraintclass VariantFMapCases (rl :: RowList Type) (ri :: Row (Type -> Type)) (ro :: Row (Type -> Type)) (a :: Type) (b :: Type) | rl -> ri ro

Instances

#VariantTraverseCases

class VariantTraverseCases :: (Type -> Type) -> RowList Type -> Row Type -> Row Type -> Constraintclass VariantTraverseCases (m :: Type -> Type) (rl :: RowList Type) (ri :: Row Type) (ro :: Row Type) | rl -> ri ro

Instances

#VariantFTraverseCases

class VariantFTraverseCases :: (Type -> Type) -> RowList Type -> Row (Type -> Type) -> Row (Type -> Type) -> Type -> Type -> Constraintclass VariantFTraverseCases (m :: Type -> Type) (rl :: RowList Type) (ri :: Row (Type -> Type)) (ro :: Row (Type -> Type)) (a :: Type) (b :: Type) | rl -> ri ro

Instances

#lookup

lookup :: forall a. String -> String -> List String -> List a -> a

#lookupTag

lookupTag :: String -> List String -> Boolean

A specialized lookup function which bails early. Foldable's elem is always worst-case.

#lookupLast

lookupLast :: forall a b. String -> (a -> b) -> List String -> List a -> { type :: String, value :: b }

#lookupFirst

lookupFirst :: forall a b. String -> (a -> b) -> List String -> List a -> { type :: String, value :: b }

#lookupPred

#lookupSucc

#lookupCardinality

#lookupFromEnum

#lookupToEnum

#BoundedDict

type BoundedDict a = { bottom :: a, top :: a }

#BoundedEnumDict

type BoundedEnumDict a = { cardinality :: Int, fromEnum :: a -> Int, pred :: a -> Maybe a, succ :: a -> Maybe a, toEnum :: Int -> Maybe a }

#impossible

impossible :: forall a. String -> a

Re-exports from Record.Unsafe

#unsafeHas

unsafeHas :: forall r1. String -> Record r1 -> Boolean

Checks if a record has a key, using a string for the key.

#unsafeGet

unsafeGet :: forall r a. String -> Record r -> a

Unsafely gets a value from a record, using a string for the key.

If the key does not exist this will cause a runtime error elsewhere.

Modules