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

Safe HaskellSafe-Infered

Top.Interface.Substitution

Description

 

Synopsis

Documentation

deSubst :: (Embedded ClassSubst (s (StateFixT s m)) t, Monad m) => Select t (StateFixT s m) a -> StateFixT s m aSource

class Monad m => HasSubst m info | m -> info whereSource

Methods

makeSubstConsistent :: m ()Source

Make the state consistent. Only relevant for substitution states that can be inconsistent (for instance, the type graph substitution state).

unifyTerms :: info -> Tp -> Tp -> m ()Source

Unify two terms. Supply additional information for this unification.

findSubstForVar :: Int -> m TpSource

Lookup the value of a type variable in the substitution

fixpointSubst :: m FixpointSubstitutionSource

Return a fixpoint substitution.

Instances

(Monad m, Embedded ClassSubst (s (StateFixT s m)) t, HasSubst (Select t (StateFixT s m)) info) => HasSubst (StateFixT s m) info 
(MonadState s m, HasBasic m info, HasTI m info, Embedded ClassSubst s (GreedyState info)) => HasSubst (Select (GreedyState info) m) info 
(MonadState s m, HasBasic m info, HasTI m info, Embedded ClassSubst s (SimpleState info)) => HasSubst (Select (SimpleState info) m) info 
(HasBasic m info, HasTI m info, HasQual m info, HasTG m info, MonadWriter LogEntries m, Show info, MonadState s m, Embedded ClassSubst s (TypeGraphState info)) => HasSubst (Select (TypeGraphState info) m) info 

applySubst :: (Substitutable a, HasSubst m info) => a -> m aSource

Apply the substitution to a value that contains type variables (a member of the Substitutable type class).