sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.AST.Utils

Description

 

Synopsis

Documentation

expressionType :: SutExpression -> SutType Source #

Extracts the type from any expression

withPrimitiveType :: SutPrimitive -> SutExpression -> SutExpression Source #

Clones the expression overriding the type for the given primitive type This is used for type coersion, mostly

asTypeError :: SutExpression -> SutExpression Source #

Clones the expression but sets the type as a TypeError