hakyll-4.4.3.0: A static website compiler library

Safe Haskell | None

Hakyll.Core.Item

Description

An item is a combination of some content and its `Identifier`. This way, we can still use the `Identifier` to access metadata.

Synopsis

- data Item a = Item {
  - itemIdentifier :: Identifier
  - itemBody :: a
  }
- itemSetBody :: a -> Item b -> Item a
- withItemBody :: (a -> Compiler b) -> Item a -> Compiler (Item b)

# Documentation

data Item a Source

Constructors

Item |

Fields

itemIdentifier :: Identifier
itemBody :: a

Instances

Functor Item |
Typeable1 Item |
Foldable Item |
Traversable Item |
Show a => Show (Item a) |
Binary a => Binary (Item a) |

itemSetBody :: a -> Item b -> Item aSource

withItemBody :: (a -> Compiler b) -> Item a -> Compiler (Item b)Source

Perform a compiler action on the item body. This is the same as `traverse`, but looks less intimidating.

     withItemBody = traverse