nyan-interpolation-core-0.9.2: Customize your nyan interpolator!
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Interpolation.Nyan.Core.Internal.RMode

Synopsis

Documentation

newtype RMode a Source #

Type that describes rendering modes.

An interpolator that has rmode'xxx :: RMode t variable available in scope will be able to use xxx rendering mode.

More precisely, any #xxx{expr} in interpolator will be expanded to renderWithMode rmode'xxx (expr) Haskell code (some switches may slightly change this behaviour though).

>>> rmode's :: Show a => RMode a
>>> rmode's = RMode (build . show)
>>> 
>>> [int||Value is #s{5}|]
"Value is 5"
>>> rmode'hex :: RMode Word
>>> rmode'hex = RMode Fmt.hexF
>>> 
>>> [int||Value is #hex{32}]
"Value is 0x20"

Constructors

RMode 

Fields