hydra-0.1.0: Type-aware transformations for data and functional programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Basics

Description

Basic functions for working with types and terms

Synopsis

Documentation

eliminationVariant :: Elimination m -> EliminationVariant Source #

Find the elimination variant (constructor) for a given elimination term

eliminationVariants :: [EliminationVariant] Source #

All elimination variants (constructors), in a canonical order

floatTypePrecision :: FloatType -> Precision Source #

Find the precision of a given floating-point type

floatTypes :: [FloatType] Source #

All floating-point types in a canonical order

floatValueType :: FloatValue -> FloatType Source #

Find the float type for a given floating-point value

functionVariant :: Function m -> FunctionVariant Source #

Find the function variant (constructor) for a given function

functionVariants :: [FunctionVariant] Source #

All function variants (constructors), in a canonical order

integerTypeIsSigned :: IntegerType -> Bool Source #

Find whether a given integer type is signed (true) or unsigned (false)

integerTypePrecision :: IntegerType -> Precision Source #

Find the precision of a given integer type

integerTypes :: [IntegerType] Source #

All integer types, in a canonical order

integerValueType :: IntegerValue -> IntegerType Source #

Find the integer type for a given integer value

literalType :: Literal -> LiteralType Source #

Find the literal type for a given literal value

literalTypeVariant :: LiteralType -> LiteralVariant Source #

Find the literal type variant (constructor) for a given literal value

literalVariant :: Literal -> LiteralVariant Source #

Find the literal variant (constructor) for a given literal value

literalVariants :: [LiteralVariant] Source #

All literal variants, in a canonical order

qname :: Namespace -> String -> Name Source #

Construct a qualified (dot-separated) name

termVariant :: Term m -> TermVariant Source #

Find the term variant (constructor) for a given term

termVariants :: [TermVariant] Source #

All term (expression) variants, in a canonical order

testLists :: [[a]] -> Int Source #

TODO: temporary. Just a token polymorphic function for testing

typeVariant :: Type m -> TypeVariant Source #

Find the type variant (constructor) for a given type

typeVariants :: [TypeVariant] Source #

All type variants, in a canonical order