Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Tier1
Description
A module for miscellaneous tier-1 functions and constants.
Synopsis
- floatValueToBigfloat :: FloatValue -> Double
- integerValueToBigint :: IntegerValue -> Integer
- isLambda :: Term -> Bool
- unqualifyName :: QualifiedName -> Name
- foldOverTerm :: TraversalOrder -> (x -> Term -> x) -> x -> Term -> x
- foldOverType :: TraversalOrder -> (x -> Type -> x) -> x -> Type -> x
- freeVariablesInTerm :: Term -> Set Name
- freeVariablesInType :: Type -> Set Name
- subterms :: Term -> [Term]
- subtypes :: Type -> [Type]
- emptyTrace :: Trace
- flowSucceeds :: s -> Flow s a -> Bool
- fromFlow :: a -> s -> Flow s a -> a
- mutateTrace :: (Trace -> Either_ String Trace) -> (Trace -> Trace -> Trace) -> Flow s a -> Flow s a
- pushError :: String -> Trace -> Trace
- warn :: String -> Flow s a -> Flow s a
- withFlag :: String -> Flow s a -> Flow s a
- withState :: s1 -> Flow s1 a -> Flow s2 a
- withTrace :: String -> Flow s a -> Flow s a
Documentation
floatValueToBigfloat :: FloatValue -> Double Source #
Convert a floating-point value of any precision to a bigfloat
integerValueToBigint :: IntegerValue -> Integer Source #
Convert an integer value of any precision to a bigint
isLambda :: Term -> Bool Source #
Check whether a term is a lambda, possibly nested within let and/or annotation terms
unqualifyName :: QualifiedName -> Name Source #
Convert a qualified name to a dot-separated name
foldOverTerm :: TraversalOrder -> (x -> Term -> x) -> x -> Term -> x Source #
Fold over a term, traversing its subterms in the specified order
foldOverType :: TraversalOrder -> (x -> Type -> x) -> x -> Type -> x Source #
Fold over a type, traversing its subtypes in the specified order
freeVariablesInTerm :: Term -> Set Name Source #
Find the free variables (i.e. variables not bound by a lambda or let) in a term
freeVariablesInType :: Type -> Set Name Source #
Find the free variables (i.e. variables not bound by a lambda or let) in a type
emptyTrace :: Trace Source #
flowSucceeds :: s -> Flow s a -> Bool Source #
Check whether a flow succeeds
fromFlow :: a -> s -> Flow s a -> a Source #
Get the value of a flow, or a default value if the flow fails
mutateTrace :: (Trace -> Either_ String Trace) -> (Trace -> Trace -> Trace) -> Flow s a -> Flow s a Source #