| License | AGPL-3 |
|---|---|
| Maintainer | stu235271@mail.uni-kiel.de stu236925@mail.uni-kiel.de |
| Safe Haskell | None |
| Language | Haskell2010 |
Docs.Renderable
Description
This module provides a class to obtain information from text nodes needed to render these text nodes as html, pdf or the like.
Synopsis
- class Renderable r where
- data DirectRenderable id = DirectRenderable {}
- directRenderable :: Renderable r => r -> id -> DirectRenderable id
Documentation
class Renderable r where Source #
Class for all types renderable as a text element.
Methods
kindOf :: r -> KindName Source #
The kind of the text
typeOf :: r -> TypeName Source #
The type of the text
contentOf :: r -> Text Source #
The content of the text; the text itself
Instances
| Renderable TextElementRevision Source # | |
Defined in Docs.Renderable Methods kindOf :: TextElementRevision -> KindName Source # typeOf :: TextElementRevision -> TypeName Source # contentOf :: TextElementRevision -> Text Source # | |
| Renderable (DirectRenderable id) Source # | |
Defined in Docs.Renderable Methods kindOf :: DirectRenderable id -> KindName Source # typeOf :: DirectRenderable id -> TypeName Source # contentOf :: DirectRenderable id -> Text Source # | |
data DirectRenderable id Source #
Datatype only intended to be used as a Renderable.
Can be used to enrich not-Renderable types such as Text with informations
needed to be renderable
Constructors
| DirectRenderable | |
Instances
| Renderable (DirectRenderable id) Source # | |
Defined in Docs.Renderable Methods kindOf :: DirectRenderable id -> KindName Source # typeOf :: DirectRenderable id -> TypeName Source # contentOf :: DirectRenderable id -> Text Source # | |
directRenderable :: Renderable r => r -> id -> DirectRenderable id Source #
Make a DirectRenderable from any Renderable