Version 0.0.6-0 of markup is deprecated.
The latest version of markup is 4.2.0-0.

markup

Version 0.0.6 revision 0 uploaded by athanclark.

Package meta

Synopsis
Abstraction for markup languages
Description

This library tries to make things more uniformly controlled when working with markup languages in haskell - namely deployment of markup assets.

Deployment, from this library's perspective, means how something can be rendered to markup, yet still achieve the same "result" to the end user (namely the DOM).

We use monad transformers to infer the deployment mechanism for a context of markup. The three deployment mechanisms provided include inline (content is slapped between markup tags), hosted (entirely external - uses raw text as a url), and local (which uses the urlpath library to realize what kind of link to create).

As an example, here is remotely hosted image:

image = deploy Image "foo.png" :: HostedMarkupM (Html ())

λ> renderMarkup image

<img src="foo.png">

Here is the same example, going relative instead:

image :: LocalMarkupM (HtmlT AbsoluteUrl ())
image = deploy Image $ "foo.png" <?> ("some","getparam")

λ> (runUrlReader $ renderTextT $ renderMarkup image $
   ) "example.com"

"<img src=\"example.com/foo.png?some=getparam\">"
Author
Athan Clark <athan.clark@gmail.com>
Bug reports
n/a
Category
n/a
Copyright
n/a
Homepage
n/a
Maintainer
Athan Clark <athan.clark@gmail.com>
Package URL
n/a
Stability
n/a

Components