hakyll-4.16.2.2: A static website compiler library

Safe Haskell | Safe-Inferred
Language | Haskell2010

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

Instances details

Foldable Item Source # |

Instance details

Defined in Hakyll.Core.Item

Methods

fold :: Monoid m => Item m -> m Source #

foldMap :: Monoid m => (a -> m) -> Item a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Item a -> m Source #

foldr :: (a -> b -> b) -> b -> Item a -> b Source #

foldr' :: (a -> b -> b) -> b -> Item a -> b Source #

foldl :: (b -> a -> b) -> b -> Item a -> b Source #

foldl' :: (b -> a -> b) -> b -> Item a -> b Source #

foldr1 :: (a -> a -> a) -> Item a -> a Source #

foldl1 :: (a -> a -> a) -> Item a -> a Source #

toList :: Item a -> [a] Source #

null :: Item a -> Bool Source #

length :: Item a -> Int Source #

elem :: Eq a => a -> Item a -> Bool Source #

maximum :: Ord a => Item a -> a Source #

minimum :: Ord a => Item a -> a Source #

sum :: Num a => Item a -> a Source #

product :: Num a => Item a -> a Source #

Traversable Item Source # |
Instance details Defined in Hakyll.Core.Item Methods traverse :: Applicative f => (a -> f b) -> Item a -> f (Item b) Source # sequenceA :: Applicative f => Item (f a) -> f (Item a) Source # mapM :: Monad m => (a -> m b) -> Item a -> m (Item b) Source # sequence :: Monad m => Item (m a) -> m (Item a) Source #
Functor Item Source # |
Instance details Defined in Hakyll.Core.Item Methods fmap :: (a -> b) -> Item a -> Item b Source # (<$) :: a -> Item b -> Item a Source #
Show a => Show (Item a) Source # |
Instance details Defined in Hakyll.Core.Item Methods showsPrec :: Int -> Item a -> ShowS Source # show :: Item a -> String Source # showList :: [Item a] -> ShowS Source #
Binary a => Binary (Item a) Source # |
Instance details Defined in Hakyll.Core.Item Methods put :: Item a -> Put Source # get :: Get (Item a) Source # putList :: [Item a] -> Put Source #

itemSetBody :: a -> Item b -> Item a Source #

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