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

Safe HaskellSafe-Infered

Top.Solver

Description

 

Synopsis

Documentation

data ConstraintSolver constraint info Source

Constructors

ConstraintSolver (SolveOptions -> [constraint] -> (SolveResult info, LogEntries)) 

makeConstraintSolver :: Empty (f () (BasicMonad f)) => (SolveOptions -> [constraint] -> BasicMonad f (SolveResult info)) -> ConstraintSolver constraint infoSource

solve :: SolveOptions -> [constraint] -> ConstraintSolver constraint info -> (SolveResult info, LogEntries)Source

onlySolveConstraints :: (HasTI m info, HasBasic m info, HasSubst m info, HasQual m info, TypeConstraintInfo info, Solvable constraint m, MonadState s m, SolveState s, MonadWriter LogEntries m) => [constraint] -> m ()Source

solveConstraints :: (HasTI m info, HasBasic m info, HasSubst m info, HasQual m info, TypeConstraintInfo info, Solvable constraint m, MonadState s m, SolveState s, MonadWriter LogEntries m) => SolveOptions -> [constraint] -> m (SolveResult info)Source

solveResult :: (HasBasic m info, HasTI m info, HasSubst m info, HasQual m info, TypeConstraintInfo info) => m (SolveResult info)Source

initialize :: (HasBasic m info, HasQual m info, HasTI m info, Substitutable a) => a -> SolveOptions -> m ()Source

newtype LogEntries Source

Constructors

LogEntries ([LogEntry] -> [LogEntry]) 

data LogEntry Source

Constructors

LogEntry 

Fields

priority :: Int
 
msg :: String
 

Instances

logState :: (MonadState s m, SolveState s, MonadWriter LogEntries m) => m ()Source

Print the current state and add this as a debug message.