Stability | experimental |
---|---|
Maintainer | developer@flocc.net |
Safe Haskell | None |
For more information please see http://www.flocc.net/
- assignDepTypes :: Monad m => VarMap TySchemeEx -> Expr -> IdxMonad m TyEnv
- assignDepTypes2 :: Monad m => VarMap TySchemeEx -> Expr -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))
- assignDepTypes3 :: (Monad m, MonadCatch m) => VarMap TySchemeEx -> Expr -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))
- assignFunDepTypes :: Monad m => VarMap TySchemeEx -> TyTerm -> Expr -> IdxMonad m TyEnv
- showExprWithDepTypes :: TyEnv -> Expr -> String
- applyVarSubstsToVarMap :: VarsIn a => VarSubsts a -> VarMap a -> VarMap a
- unify :: Monad m => [TyConstr] -> IdxMonad m (Either ([(TyTerm, TyTerm)], VarSubsts TyTerm) (TyConstr, VarSubsts TyTerm))
- solveDepConstrs2 :: Monad m => TyEnv -> [TyConstr] -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))
- solveDepConstrs3 :: (Monad m, MonadCatch m) => IntMap Expr -> IntMap TySchemeEx -> TyEnv -> [TyConstr] -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))
Documentation
assignDepTypes :: Monad m => VarMap TySchemeEx -> Expr -> IdxMonad m TyEnv
assignDepTypes2 :: Monad m => VarMap TySchemeEx -> Expr -> IdxMonad m (Either TyEnv (TyConstr, TyEnv))
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.
showExprWithDepTypes :: TyEnv -> Expr -> String
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.