flocc-pffb

Stabilityexperimental
Maintainerdeveloper@flocc.net
Safe HaskellNone

Compiler.Types2.DepTypeAssignment

Description

For more information please see http://www.flocc.net/

Synopsis

Documentation

assignDepTypes3 :: (Monad m, MonadCatch m) => VarMap TySchemeEx -> Expr -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))

assignDepTypes3 varEnv expr. Tries to infer the types for expr, building and solving constraints |and simplifying those constraints that can be (i.e. embedded functions).

assignFunDepTypes :: Monad m => VarMap TySchemeEx -> TyTerm -> Expr -> IdxMonad m TyEnv

assignFunDepTypes varEnv domTy expr. Returns the types of the expressions in expr |where expr is a function type, and domTy is the type of the function's domain.

applyVarSubstsToVarMap :: VarsIn a => VarSubsts a -> VarMap a -> VarMap a

applyVarSubstsToVarMap subs varMap applies all the substitutions in |subs to the map varMap.

unify :: Monad m => [TyConstr] -> IdxMonad m (Either ([(TyTerm, TyTerm)], VarSubsts TyTerm) (TyConstr, VarSubsts TyTerm))

Unify all constraints ignoring those with a Ref on one side |and returning them at the end if the unification succeeds

Unify all constraints ignoring those with a Ref on one side |and returning them at the end if the unification succeeds

solveDepConstrs2 :: Monad m => TyEnv -> [TyConstr] -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))

DANGER! If applyDimGensInEnv can keep on producing new constraints |then this will never terminate!

solveDepConstrs3 :: (Monad m, MonadCatch m) => IntMap Expr -> IntMap TySchemeEx -> TyEnv -> [TyConstr] -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))

solveDepConstrs3 expEnv varTys tyEnv consL. Tries to solve all constraints |in consL, returning the substitutions that make the constraints in consL |unify if they unify, or the subsititutions so far and the failing constraint |if it fails.