sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.Parser.TypeCheck

Description

 

Synopsis

Documentation

checkPrimitiveType :: (SutPrimitive -> SutPrimitive) -> SutExpression -> SutExpression Source #

Takes a conversion function from primitive to primitive and checks/converts the given expression

checkNumeric :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to numeric

checkEq :: SutExpression -> SutExpression Source #

Checks if expression is checked for equality

checkSortable :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to a sortable type

checkBoolean :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to boolean

checkIndex :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to an index type

checkInt :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to integer (index type)

checkFloat :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to float

checkPrintable :: SutExpression -> SutExpression Source #

Checks if expression is or can be converted to string for printing