sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.Types.Constructors

Description

 

Synopsis

Documentation

type SutTypeID = Int Source #

A type will be represented by an ID

data SutType Source #

Sutori type constructors

Constructors

SutPrimitiveType SutPrimitive

A Primitive Type

SutDirection SutTypeID

A Direction (Pointer) to a value of some type

SutChain Int SutTypeID

A Chain (Array) of fixed size of element type

SutMachine [(SutID, SutTypeID)]

A Machine (Struct) of different components

SutThing [(SutID, SutTypeID)]

A Thing (Union) that might have different names

primitiveType :: SutType -> SutPrimitive Source #

Extract the primitive from the type definition

generalizeTypes :: SutType -> SutType -> SutType Source #

Generalize two types to their LCA, if any

primitiveError :: SutType Source #

Constant primitive error type