Safe Haskell | None |
---|
Language.Nano.Typecheck.TCMonad
Contents
Description
This module has the code for the Type-Checker Monad. You need not modify the code here, just use the exported API.
- type TCM = ErrorT String (State TCState)
- execute :: Nano z (RType r) -> TCM a -> Either [(SourcePos, String)] a
- logError :: a -> SourcePos -> String -> TCM a
- tcError :: IsLocated l => l -> String -> TCM a
- freshTyArgs :: SourcePos -> ([TVar], Type) -> TCM Type
- getSubst :: TCM Subst
- setSubst :: Subst -> TCM ()
- accumAnn :: (AnnInfo -> [(SourcePos, String)]) -> TCM () -> TCM ()
- getAllAnns :: TCM [AnnInfo]
- unifyType :: (PrintfArg t1, PP a, IsLocated l) => l -> t1 -> a -> Type -> Type -> ErrorT String (State TCState) ()
- unifyTypes :: IsLocated l => l -> String -> [Type] -> [Type] -> TCM Subst
- getDefType :: (PP a, Symbolic a, IsLocated a) => a -> ErrorT String (State TCState) Type
TC Monad
Execute
Log Errors
Error Action
Freshness
Substitutions
Annotations
getAllAnns :: TCM [AnnInfo]Source
Unification
unifyType :: (PrintfArg t1, PP a, IsLocated l) => l -> t1 -> a -> Type -> Type -> ErrorT String (State TCState) ()Source
Get Type Signature
getDefType :: (PP a, Symbolic a, IsLocated a) => a -> ErrorT String (State TCState) TypeSource