Portability | GHC |
---|---|
Stability | unstable |
Maintainer | stephen.tetley@gmail.com |
Flexible text type, composable with pretty-print
style
operators.
Direction zero (left-to-right) only.
- data Doc u a
- type DocGraphic u = Doc u (UNil u)
- runDoc :: Doc u a -> VAlign -> FontFamily -> PosObject u a
- (<+>) :: InterpretUnit u => DocGraphic u -> DocGraphic u -> DocGraphic u
- blank :: InterpretUnit u => DocGraphic u
- space :: InterpretUnit u => DocGraphic u
- string :: InterpretUnit u => String -> DocGraphic u
- escaped :: InterpretUnit u => EscapedText -> DocGraphic u
- embedPosObject :: PosObject u a -> Doc u a
- bold :: Doc u a -> Doc u a
- italic :: Doc u a -> Doc u a
- boldItalic :: Doc u a -> Doc u a
- monospace :: InterpretUnit u => EscapedChar -> EscapedText -> DocGraphic u
- int :: InterpretUnit u => Int -> DocGraphic u
- integer :: InterpretUnit u => Integer -> DocGraphic u
- float :: (RealFloat a, InterpretUnit u) => a -> DocGraphic u
- ffloat :: (RealFloat a, InterpretUnit u) => Maybe Int -> a -> DocGraphic u
- strikethrough :: (Fractional u, InterpretUnit u) => Doc u a -> Doc u a
- underline :: (Fractional u, InterpretUnit u) => Doc u a -> Doc u a
- highlight :: (Fractional u, InterpretUnit u) => RGBi -> Doc u a -> Doc u a
Documentation
Doc type.
Monad (Doc u) | |
Functor (Doc u) | |
Applicative (Doc u) | |
DrawingCtxM (Doc u) | |
(Monoid a, InterpretUnit u) => Monoid (Doc u a) | |
(Monoid a, Fractional u, InterpretUnit u) => Concat (Doc u a) |
type DocGraphic u = Doc u (UNil u)Source
(<+>) :: InterpretUnit u => DocGraphic u -> DocGraphic u -> DocGraphic uSource
Concatenate two Docs separated with a space.
(infixr 6)
blank :: InterpretUnit u => DocGraphic uSource
space :: InterpretUnit u => DocGraphic uSource
string :: InterpretUnit u => String -> DocGraphic uSource
escaped :: InterpretUnit u => EscapedText -> DocGraphic uSource
embedPosObject :: PosObject u a -> Doc u aSource
boldItalic :: Doc u a -> Doc u aSource
monospace :: InterpretUnit u => EscapedChar -> EscapedText -> DocGraphic uSource
int :: InterpretUnit u => Int -> DocGraphic uSource
integer :: InterpretUnit u => Integer -> DocGraphic uSource
float :: (RealFloat a, InterpretUnit u) => a -> DocGraphic uSource
Specialized version of ffloat
- the answer is always
rendered at "full precision".
ffloat :: (RealFloat a, InterpretUnit u) => Maybe Int -> a -> DocGraphic uSource
This is equivalent to showFFloat
in the Numeric module.
Like showFFloat
, the answer is rendered to supplied
precision. Nothing
indicated full precision.
strikethrough :: (Fractional u, InterpretUnit u) => Doc u a -> Doc u aSource
underline :: (Fractional u, InterpretUnit u) => Doc u a -> Doc u aSource
highlight :: (Fractional u, InterpretUnit u) => RGBi -> Doc u a -> Doc u aSource