Copyright | (c) Kimiyuki Onaka 2021 |
---|---|
License | Apache License 2.0 |
Maintainer | kimiyuki95@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- builtinToType :: MonadError Error m => Builtin -> [Type] -> m Type
- semigroupToType :: Semigroup' -> Type
- literalToType :: MonadError Error m => Literal -> m Type
- arityOfBuiltin :: MonadError Error m => Builtin -> [Type] -> m Int
- type TypeEnv = [(VarName, Type)]
- typecheckExpr :: MonadError Error m => TypeEnv -> Expr -> m Type
- typecheckToplevelExpr :: MonadError Error m => TypeEnv -> ToplevelExpr -> m Type
- typecheckProgram :: MonadError Error m => Program -> m Type
Documentation
builtinToType :: MonadError Error m => Builtin -> [Type] -> m Type Source #
semigroupToType :: Semigroup' -> Type Source #
literalToType :: MonadError Error m => Literal -> m Type Source #
arityOfBuiltin :: MonadError Error m => Builtin -> [Type] -> m Int Source #
typecheckExpr :: MonadError Error m => TypeEnv -> Expr -> m Type Source #
typecheckExpr
checks that the given Expr
has the correct types.
typecheckToplevelExpr :: MonadError Error m => TypeEnv -> ToplevelExpr -> m Type Source #
typecheckProgram :: MonadError Error m => Program -> m Type Source #