Stability | experimental |
---|---|
Maintainer | developer@flocc.net |
Safe Haskell | None |
For more information please see http://www.flocc.net/
- trace' :: String -> a -> a
- type ExpMap a = IntMap a
- type VarMap v = IntMap v
- expMapFromList :: [(Idx, v)] -> VarMap v
- varMapLookup :: VarMap a -> Idx -> Maybe a
- varMapFromList :: [(Idx, v)] -> VarMap v
- varMapFromSchemeEnv :: [(Idx, Scheme l t)] -> VarMap (Term l t)
- composeVarMaps :: VarMap a -> VarMap a -> VarMap a
- showDepTyScheme :: TyScheme -> String
- showDepExprTy :: TyEnv -> Idx -> String
- showExprWithDepTypes :: TyEnv -> Expr -> String
- lookupVar :: VarMap a -> VarMap a -> Idx -> Maybe a
- getIdExprPairs :: (IdTree, Expr) -> [(Idx, Expr)]
- instantiateSchemeEx3 :: Monad m => VarMap TySchemeEx -> TySchemeEx -> Expr -> IdxMonad m TyTerm
- buildConstrs :: Monad m => VarMap TySchemeEx -> VarMap TySchemeEx -> Expr -> StateT TyEnv (IdxMonad m) ([TyConstr], TyTerm)
- checkConstraints :: [TyConstr] -> [TyConstr]
Documentation
trace is used to display or hide debugging |info depending on its implementation
expMapFromList :: [(Idx, v)] -> VarMap v
expMapFromList takes an associative array and returns |the ExpMap equivalent.
varMapLookup :: VarMap a -> Idx -> Maybe a
varMapLookup returns the value stored under the key given |in the VarMap provided.
varMapFromList :: [(Idx, v)] -> VarMap v
varMapFromList takes an associative array and returns |the VarMap equivalent.
varMapFromSchemeEnv :: [(Idx, Scheme l t)] -> VarMap (Term l t)
composeVarMaps :: VarMap a -> VarMap a -> VarMap a
composeVarMaps creates the left biased union of |VarMaps a and b.
showDepTyScheme :: TyScheme -> String
Pretty print type scheme
showDepExprTy :: TyEnv -> Idx -> String
showExprWithDepTypes :: TyEnv -> Expr -> String
lookupVar :: VarMap a -> VarMap a -> Idx -> Maybe a
lookupVar takes two var maps and an id and tries to |lookup the value in the first map, or failing that in |the second map.
getIdExprPairs :: (IdTree, Expr) -> [(Idx, Expr)]
getIdExprPairs zips together an IdTree and a tuple expression tree |returning a lift of pairs of id tree ids to expressions.
instantiateSchemeEx3 :: Monad m => VarMap TySchemeEx -> TySchemeEx -> Expr -> IdxMonad m TyTerm
Instantiates a term SchemeEx by replacing every qualified term variable |with a new variable, and every function application qualified variable |with a ref to that var id (or expression id).
buildConstrs :: Monad m => VarMap TySchemeEx -> VarMap TySchemeEx -> Expr -> StateT TyEnv (IdxMonad m) ([TyConstr], TyTerm)
For a given expression sets up the type environment, constraints, |and expandable expression map.
checkConstraints :: [TyConstr] -> [TyConstr]
Check that the constraints are all disjoint (no circular variables)