Copyright | (c) Olaf Klinke |
---|---|
License | GPL-3 |
Maintainer | olaf.klinke@phymetric.de |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Haskell has no dependent types, whence we can store only one type of value
at each node of the data dependency graph. If in addition to Pandoc
you want to extract the data in a machine-readable format,
then set the alt
type parameter of your Provenience actions accordingly
and provide Representation
instances for all your variable values.
Each call to render
or renderWith
automatically invokes a call to representation
.
In order to keep the dependency list of this package small beyond the dependencies of pandoc, we have omitted many useful instances. Add your own instances as you see fit, for example
instance Serializable a => Representation a ByteString where representation = toByteString
For spreadsheet-like representations,
- basic values become single cells in a single row,
- foldable structures of basic values become single columns,
- doubly-nested structures of basic values become proper tables.
Synopsis
- class Representation a b where
- representation :: a -> b
Documentation
class Representation a b where Source #
A representation of type a
as type b
, not necessarily invertible.
representation :: a -> b Source #