Hakyll.Core.Item

hakyll-4.7.5.1: A static website compiler library

Safe Haskell | None
Language | Haskell98

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

Constructors

Item |
Fields itemIdentifier :: Identifier itemBody :: a

Instances

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

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

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

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

    withItemBody = traverse