Copyright | (c) David Darais David Christiansen and Weixi Ma 2016-2017 |
---|---|
License | MIT |
Maintainer | david.darais@gmail.com |
Stability | experimental |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
EnvT
extends a pretty printer to track a lexical environment.
- class (MonadPretty w ann fmt m, MonadReaderEnv env m) => MonadPrettyEnv env w ann fmt m | m -> w, m -> ann, m -> fmt, m -> env
- class MonadReaderEnv env m | m -> env where
- newtype EnvT env m a = EnvT {}
- runEnvT :: env -> EnvT env m a -> m a
- mapEnvT :: (m a -> n b) -> EnvT env m a -> EnvT env n b
Documentation
class (MonadPretty w ann fmt m, MonadReaderEnv env m) => MonadPrettyEnv env w ann fmt m | m -> w, m -> ann, m -> fmt, m -> env Source #
Pretty monads that can read environments. Use this to implement lexical scope in your pretty printer, because the dynamic extent of pretty monad computations typically corresponds to the scope of a binder.
class MonadReaderEnv env m | m -> env where Source #
A reader of environments
Monad m => MonadReaderEnv env (EnvT env m) Source # | |
The transformer
A transformer that adds a reader effect, distinguished by the newtype tag.
MonadPretty w ann fmt m => MonadPretty w ann fmt (EnvT env m) Source # | |
(Monad m, Measure w fmt m) => Measure w fmt (EnvT env m) Source # | |
MonadReader r m => MonadReader r (EnvT env m) Source # | |
MonadState s m => MonadState s (EnvT env m) Source # | |
MonadWriter o m => MonadWriter o (EnvT env m) Source # | |
(Monad m, MonadReaderPrec ann m) => MonadReaderPrec ann (EnvT env m) Source # | |
Monad m => MonadReaderEnv env (EnvT env m) Source # | |
MonadTrans (EnvT env) Source # | |
Monad m => Monad (EnvT env m) Source # | |
Functor m => Functor (EnvT env m) Source # | |
Applicative m => Applicative (EnvT env m) Source # | |
Alternative m => Alternative (EnvT env m) Source # | |