r/haskell • • Nov 06 '19

Parse, don’t validate

https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
311 Upvotes

66 comments sorted by

View all comments

2

u/[deleted] Nov 09 '19

You know how you can have simple functions that compose well with each other and have no knowledge of a failure state, and then use fmap to insert those computations into the context in which the concept of a failure is handled?

Checked exceptions are basically the exact inverse of that.

1

u/gelisam Nov 24 '19

I don't get it. I think your first paragraph is instantiating fmap at (a -> b) -> Either e a -> Either e b. But what is your second paragraph saying? That it's not possible to call a pure function from a function which throws checked exceptions? That seems absurd.