Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The glam interpreter
Synopsis
- data Statement
- data GlamState = GlamState {}
- typeBindings :: Lens' GlamState (Map TVar ([TVar], Type))
- termBindings :: Lens' GlamState (Map Var (Maybe Value, Polytype))
- type MonadGlam = MonadState GlamState
- runGlamT :: Monad m => StateT GlamState m a -> m a
- runGlam :: StateT GlamState Identity c -> c
- evalTerm :: MonadGlam m => Term -> m Value
- withTypes :: MonadState GlamState m => ReaderT (Map TVar TVarBinding) m b -> m b
- withTerms :: MonadState GlamState m => ReaderT Environment m b -> m b
- getWords :: MonadGlam m => m [Var]
- getType :: MonadGlam m => String -> m (Either String Polytype)
- statement :: Parser Statement
- file :: Parser [Statement]
- runFile :: MonadGlam m => String -> String -> m (Either String [String])
- runStatement :: (MonadGlam m, MonadWriter [String] m, MonadError String m) => Statement -> m ()
Documentation
Program statements
type MonadGlam = MonadState GlamState Source #
withTypes :: MonadState GlamState m => ReaderT (Map TVar TVarBinding) m b -> m b Source #
withTerms :: MonadState GlamState m => ReaderT Environment m b -> m b Source #
runStatement :: (MonadGlam m, MonadWriter [String] m, MonadError String m) => Statement -> m () Source #