Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data EvalSt a = EvalSt {
- probabilities :: [Double]
- boundExpr :: IntMap (Expression a)
- renameCtx :: Renames
- topLevel :: Map Text Unique
- lexerState :: AlexUserState
- tyEnv :: TyEnv a
- constructors :: IntMap (NonEmpty (TyName a))
- addDecl :: MonadState (EvalSt a) m => Declaration a -> m ()
- loadDickinson :: (MonadError (DickinsonError a) m, MonadState (EvalSt a) m) => [Declaration a] -> m ()
- evalDickinsonAsMain :: (MonadError (DickinsonError a) m, MonadState (EvalSt a) m) => [Declaration a] -> m Text
- resolveExpressionM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Expression a -> m (Expression a)
- resolveDeclarationM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Declaration a -> m (Declaration a)
- evalExpressionM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Expression a -> m (Expression a)
- evalExpressionAsTextM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Expression a -> m Text
- findDecl :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Text -> m (Expression a)
- findMain :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => m (Expression a)
- lexerStateLens :: HasLexerState a => Lens' a AlexUserState
- balanceMax :: (HasRenames s, HasLexerState s) => MonadState s m => m ()
Documentation
The state during evaluation
EvalSt | |
|
Instances
HasTyEnv EvalSt Source # | |
Defined in Language.Dickinson.Eval | |
HasLexerState (EvalSt a) Source # | |
Defined in Language.Dickinson.Eval lexerStateLens :: Lens' (EvalSt a) AlexUserState Source # | |
HasRenames (EvalSt a) Source # | |
Pretty (EvalSt a) Source # | |
Defined in Language.Dickinson.Eval |
addDecl :: MonadState (EvalSt a) m => Declaration a -> m () Source #
loadDickinson :: (MonadError (DickinsonError a) m, MonadState (EvalSt a) m) => [Declaration a] -> m () Source #
evalDickinsonAsMain :: (MonadError (DickinsonError a) m, MonadState (EvalSt a) m) => [Declaration a] -> m Text Source #
resolveExpressionM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Expression a -> m (Expression a) Source #
Resolve let bindings and such; do not perform choices or concatenations.
resolveDeclarationM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Declaration a -> m (Declaration a) Source #
evalExpressionM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Expression a -> m (Expression a) Source #
evalExpressionAsTextM :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Expression a -> m Text Source #
findDecl :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => Text -> m (Expression a) Source #
findMain :: (MonadState (EvalSt a) m, MonadError (DickinsonError a) m) => m (Expression a) Source #
lexerStateLens :: HasLexerState a => Lens' a AlexUserState Source #
balanceMax :: (HasRenames s, HasLexerState s) => MonadState s m => m () Source #