helium-1.8.1: The Helium Compiler.

Safe HaskellSafe-Inferred
LanguageHaskell98

Helium.StaticAnalysis.Miscellaneous.TypeConstraints

Description

basic constraints that are supplied by the Top framework). Some constraints are lifted to work on finite maps as well.

Documentation

data TypeConstraint info Source

Constructors

TC1 (EqualityConstraint info) 
TC2 (ExtraConstraint info) 
TC3 (PolymorphismConstraint info) 
TCOper String (forall m. HasSubst m info => m ()) 

Instances

Show info => Show (TypeConstraint info) 
Substitutable (TypeConstraint info) 
(HasBasic m info, HasTI m info, HasSubst m info, HasQual m info, PolyTypeConstraintInfo info) => Solvable (TypeConstraint info) m 

lift :: Ord k => (a1 -> t1 -> t2 -> a) -> Map k a1 -> Map k [(t, t1)] -> (t -> t2) -> ([a], Map k [(t, t1)]) Source

(.==.) :: Show info => Tp -> Tp -> info -> TypeConstraint info infix 3 Source

(.===.) :: (Show info, Ord key) => Map key Tp -> Map key [(key, Tp)] -> (key -> info) -> ([TypeConstraint info], Map key [(key, Tp)]) infix 3 Source

(.::.) :: Show info => Tp -> TpScheme -> info -> TypeConstraint info infix 3 Source

(.:::.) :: (Show info, Ord key) => Map key TpScheme -> Map key [(key, Tp)] -> (key -> info) -> ([TypeConstraint info], Map key [(key, Tp)]) infix 3 Source

(!::!) :: Tp -> TpScheme -> Tps -> info -> TypeConstraint info infix 3 Source

(!:::!) :: (Show info, Ord key) => Map key TpScheme -> Map key Tp -> Tps -> (Tps -> key -> key -> info) -> ([TypeConstraint info], Map key Tp) infix 3 Source

(.<=.) :: Show info => Tp -> Sigma Predicates -> info -> TypeConstraint info infix 3 Source

(.<==.) :: (Show info, Ord key) => Map key (Sigma Predicates) -> Map key [(key, Tp)] -> (key -> info) -> ([TypeConstraint info], Map key [(key, Tp)]) infix 3 Source

(!<=!) :: Show info => Tps -> Tp -> Tp -> info -> TypeConstraint info infix 3 Source

(!<==!) :: (Show info, Ord key) => Tps -> Map key Tp -> Map key [(key, Tp)] -> (key -> info) -> ([TypeConstraint info], Map key [(key, Tp)]) infix 3 Source

genConstraints :: Tps -> (key -> info) -> [(Int, (key, Tp))] -> TypeConstraints info Source