hakyll icon indicating copy to clipboard operation
hakyll copied to clipboard

boolField with (Item a -> Compiler Bool)

Open Kritzefitz opened this issue 7 years ago • 3 comments

The current boolField only accepts a function of type Item a -> Bool. In some cases it would be useful to have a version of boolField that accepts a function fo type Item a -> Compiler a.

Kritzefitz avatar Sep 02 '17 12:09 Kritzefitz

True, but you can also just use field -- look at the definition of boolField.

jaspervdj avatar Sep 02 '17 12:09 jaspervdj

Yes, that's what my current solution looks like. Nonetheless I think this would be a helper worth having in Hakyll.

Kritzefitz avatar Sep 02 '17 12:09 Kritzefitz

Okay, do you want to send a pull request to add boolFieldM?

jaspervdj avatar Sep 02 '17 13:09 jaspervdj