Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boolField with (Item a -> Compiler Bool) #564

Closed
Kritzefitz opened this issue Sep 2, 2017 · 4 comments
Closed

boolField with (Item a -> Compiler Bool) #564

Kritzefitz opened this issue Sep 2, 2017 · 4 comments

Comments

@Kritzefitz
Copy link

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.

@jaspervdj
Copy link
Owner

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

@Kritzefitz
Copy link
Author

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

@jaspervdj
Copy link
Owner

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

Kritzefitz added a commit to Kritzefitz/hakyll that referenced this issue Sep 2, 2017
This commits adds the helper boolFieldM. In contrast to boolField it
allows using the Compiler monad in the passed function.
boolField is also redefined in terms of boolFieldM.
Closes jaspervdj#564
@LaurentRDC
Copy link
Collaborator

Fixed in #1044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants