Top-1.7: Constraint solving framework employed by the Helium Compiler.

Safe HaskellNone

Top.Implementation.Basic

Description

An interface for a monad that constains the most basic operations to solve constraints. Can be reused for all kinds of constraint-based analyses.

Synopsis

Documentation

data BasicState info m Source

A BasicState is parameterized over the monad in which the constraints can be solved, and over the information that is stored with each constraint.

Constructors

BasicState 

Fields

constraints :: Constraints m

A stack of constraints that is to be solved

errors :: [(info, ErrorLabel)]

The detected errors

conditions :: [(m Bool, String)]

Conditions to check (for the solved constraints)

optionStop :: Option Bool

Discard all remaining constraints after the first error

optionCheck :: Option Bool
 

Instances

Embedded ClassBasic (BasicState info m) (BasicState info m) 
Embedded ClassBasic (Fix (BasicState info) x m) (BasicState info m) 
Show (BasicState info m) 
Empty (BasicState info m)

An empty BasicState.

SolveState (BasicState info m) 
(MonadState s m, Embedded ClassBasic s (BasicState info m)) => HasBasic (SelectFix (BasicState info) m) info