Module

Data.Variant.Internal

Package
purescript-variant
Repository
natefaubion/purescript-variant

#FProxy Source

data FProxy (a :: Type -> Type)

Proxy for a Functor.

Constructors

#VariantRep Source

newtype VariantRep a

Constructors

#VariantCase Source

#VariantFCase Source

#VariantTags Source

class VariantTags (rl :: RowList)  where

Members

Instances

#Contractable Source

class Contractable gt lt  where

Members

Instances

#VariantMatchCases Source

class VariantMatchCases (rl :: RowList) (vo :: # Type) b | rl -> vo b

Instances

#VariantFMatchCases Source

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

Instances

#lookup Source

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

#lookupTag Source

lookupTag :: String -> List String -> Boolean

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

#lookupLast Source

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

#lookupFirst Source

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

#lookupPred Source

#lookupSucc Source

#lookupCardinality Source

#lookupFromEnum Source

#lookupToEnum Source

#BoundedDict Source

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

#BoundedEnumDict Source

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

#impossible Source

impossible :: forall a. String -> a

Re-exports from Record.Unsafe

#unsafeHas Source

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

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

#unsafeGet Source

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.

Re-exports from Type.Row

#RProxy Source

data RProxy (row :: # Type)

Constructors

#RLProxy Source

data RLProxy (rowList :: RowList)

Constructors