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

Hydra.Basics

Description

A tier-2 module of basic functions for working with types and terms.

Synopsis

Documentation

eliminationVariant :: Elimination -> 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 -> FunctionVariant Source #

Find the function variant (constructor) for a given function

functionVariants :: [FunctionVariant] Source #

All function variants (constructors), in a canonical order

id_ :: a -> a Source #

The identity function

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

termVariant :: Term -> TermVariant Source #

Find the term variant (constructor) for a given term

termVariants :: [TermVariant] Source #

All term (expression) variants, in a canonical order

typeVariant :: Type -> TypeVariant Source #

Find the type variant (constructor) for a given type

typeVariants :: [TypeVariant] Source #

All type variants, in a canonical order

capitalize :: String -> String Source #

Capitalize the first letter of a string

decapitalize :: String -> String Source #

Decapitalize the first letter of a string

mapFirstLetter :: (String -> String) -> String -> String Source #

A helper which maps the first letter of a string to another string