Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
A wrapper around an extension of any type so it can be stored in an ExtMap
class (Typeable m, Monad m) => HasExtMonad m where Source #
ext :: forall a e. (Show a, Typeable a, Default a, HasExts e) => Lens' e a Source #
This is a lens which will focus the extension state that matches the type inferred as the focal point. It's a little bit of magic, if you treat the focus as a member of your extension state it should just work out.
This lens falls back on the extension's Default
instance (when getting) if
nothing has yet been stored.