sslang-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

IR.Constraint.Solve

Synopsis

Documentation

run :: Constraint -> TC () Source #

RUN SOLVER

type Pools = IOVector [Variable] Source #

data State Source #

Constructors

State 

Fields

addError :: State -> Error -> State Source #

ERROR HELPERS

occurs :: State -> (Identifier, Variable) -> TC State Source #

OCCURS CHECK

generalize :: Mark -> Mark -> Int -> Pools -> TC () Source #

GENERALIZE

Every variable has rank less than or equal to the maxRank of the pool. This sorts variables into the young and old pools accordingly.

poolToRankTable :: Mark -> Int -> [Variable] -> TC (Vector [Variable]) Source #

adjustRank :: Mark -> Mark -> Int -> Variable -> TC Int Source #

ADJUST RANK

introduce :: Int -> Pools -> [Variable] -> TC () Source #

REGISTER VARIABLES

typeToVariable :: Int -> Pools -> Type -> TC Variable Source #

TYPE TO VARIABLE