stgi-1.1: Educational implementation of the STG (Spineless Tagless G-machine)

Safe HaskellNone
LanguageHaskell2010

Stg.Machine.Evaluate.ErrorTransitions

Description

STG error transitions, in order to provide useful information to the user.

Synopsis

Documentation

updatableClosureWithArgs :: StgState -> Maybe StgState Source #

Page 39, 2nd paragraph: "[...] closures with non-empty argument lists are never updatable [...]"

returnWithEmptyReturnStack :: StgState -> Maybe StgState Source #

Page 39, 4th paragraph: "It is not possible for the ReturnInt state to see an empty return stack, because that would imply that a closure should be updated with a primitive value; but no closure has a primitive type."

functionArgumentNotInScope :: StgState -> Maybe StgState Source #

A function was applied to an argument that was neither globally defined nor in the local environment

constructorArgumentNotInScope :: StgState -> Maybe StgState Source #

A constructor was applied to an argument that was neither globally defined nor in the local environment

primopArgumentNotInScope :: StgState -> Maybe StgState Source #

A primitive operation was applied to an argument that was neither globally defined nor in the local environment

algReturnToPrimAlts :: StgState -> Maybe StgState Source #

Algebraic constructor return, but primitive alternative on return frame

primReturnToAlgAlts :: StgState -> Maybe StgState Source #

Primitive return, but algebraic alternative on return frame

enterBlackhole :: StgState -> Maybe StgState Source #

A black hole was entered, and the infinite recursion detection triggered as a result

updateClosureWithPrimitive :: StgState -> Maybe StgState Source #

Closures are always lifted, not primitive

nonAlgPrimScrutinee :: StgState -> Maybe StgState Source #

Non-algebraic scrutinee

For more information on this, see seq.

divisionByZero :: StgState -> Maybe StgState Source #

A primitive division had zero as denominator

badConArity :: StgState -> Maybe StgState Source #

Bad constructor arity: different number of arguments in code segment and in return frame