Skip to content

Add thenValidate combinator#456

Open
jecaro wants to merge 1 commit intokowainik:mainfrom
jecaro:thenValidate
Open

Add thenValidate combinator#456
jecaro wants to merge 1 commit intokowainik:mainfrom
jecaro:thenValidate

Conversation

@jecaro
Copy link
Copy Markdown

@jecaro jecaro commented Nov 25, 2025

This is a little combinator I found convenient when using the library.

It allows you to apply a validation function to the deserialized value. It is thus useful to enforce invariants on custom data types, for example, check that a Int is strictly positive etc...

@tomjaguarpaw
Copy link
Copy Markdown
Contributor

Hi @jecaro, thanks for this. Just to set expectations, tomland (and pretty much the whole Kowainik ecosystem) is in something like "emergency maintenance only mode" right now. I maintain it enough to keep things building with new GHC releases, but that's it. @vrom911 is the one with sufficient authority to determine changes to the package, and she has not been active recently.

@jecaro
Copy link
Copy Markdown
Author

jecaro commented Nov 25, 2025

Sure, I understand the situation.

In any case, having this little piece of code around, even in an unmerged PR, could be useful to people running into the same needs.

Thanks for keeping those libraries up to date with recent GHC versions 🙏

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 this pull request may close these issues.

2 participants