| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Analyzer.Result
Description
This module contains types and functions needed for representing analysis result.
Synopsis
- type Result a = ExceptT Err (State Env) a
- type ResultValue = Either Err
- data Err
- newtype Env = Env {}
- emptyEnv :: Env
- data Scope = Scope {}
- data ScopeType
- scope :: ScopeType -> [(Identifier, Type)] -> Scope
- emptyScope :: ScopeType -> Scope
- scopes :: Iso' Env [Scope]
- vars :: Lens' Scope (Map Identifier Type)
- scopeType :: Lens' Scope ScopeType
- var :: Applicative f => Int -> Identifier -> LensLike' f Env (Maybe Type)
Analysis result
Result value
Represents an unsuccessful analysis.
Constructors
| NoMain | No entry point for the interpreter error. |
| IdentifierNotFound Identifier | Identifier not found error. |
| IdentifierRedeclaration Identifier | Identifier redeclaration error. |
| MismatchedTypes | Mismatched types error. |
| NotInIntBounds | Constant integer expression not in |
| DivisionByZero | Division by 0 in constant integer expression error. |
| BreakOrContinueOutsideOfForScope |
|
State
Environment
Analyzer environment.
Scope
Scope contains identifiers mapped to their types.
Constructors
| Scope | |
Fields
| |
scope :: ScopeType -> [(Identifier, Type)] -> Scope Source #
Create Scope from its type and elements.
Optics
var :: Applicative f => Int -> Identifier -> LensLike' f Env (Maybe Type) Source #