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 :: Builtin -> Type
- semigroupToType :: Semigroup' -> Type
- literalToType :: Literal -> Type
- arityOfBuiltin :: Builtin -> 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 :: Builtin -> Type Source #
semigroupToType :: Semigroup' -> Type Source #
literalToType :: Literal -> Type Source #
arityOfBuiltin :: Builtin -> 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 #