Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
A buffer, holds the text in the buffer and any extension states that are set on the buffer.
class HasBuffer a where Source #
This allows creation of polymorphic lenses over any type which has access to a Buffer
bufExt :: forall a s. (Show a, Typeable a, Default a, HasBuffer s) => Lens' s a Source #
bufExt
is a lens which will focus a given extension's state within a
buffer (within a BufAction
). The lens will automagically focus
the required extension by using type inference. 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.
A wrapper around an extension of any type so it can be stored in an ExtMap