Replies: 3 comments 13 replies
-
Sounds like WriterT. I hadn't heard of ChronicleT tbh. So not sure what it adds over WriterT or ValidationT -- a cursory look at the source suggests a three term result (This, That, These), but I've not really looked in any depth. I'll take a deeper look tomorrow if I can. If not, it'll probably be next week before I can respond. |
Beta Was this translation helpful? Give feedback.
-
|
Very interesting, clearly created by someone with a literary background! Could also be worth implementing yourself as a learning exercise, and then either contributing or maintaining your own separate library depending on what @louthy thinks. Can't hurt to contribute to the ecosystem even if you can't to the library! |
Beta Was this translation helpful? Give feedback.
-
|
I've created a branch to prototype the idea. I've created a This may not be a problem, but it already stops the Overall, I'm not against the idea, but my gut feeling right now is "not for v5". Because I've been trying to take a bit of time away from lang-ext to focus on other things, so adding items to the v5 release list is probably not wise. So, perhaps take the ideas from my implementation, have a play, and as @micmarsh suggests: make a library of your own. I think there's enough here that I would be interested in it post-v5 release. And maybe if I get bored, I'll continue to have a play with the idea, but for now I think it's best I leave it for post any v5 release (officially). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My question is ultimately does ChronicleT add anything above ValidationT?
For context, ChronicleT is implemented in Haskell here https://hackage.haskell.org/package/monad-chronicle-1.1/docs/Control-Monad-Chronicle.html#t:ChronicleT
I also partially ask as I wonder if this would be something I can personally contribute to language-ext as I am thoroughly enjoying using it.
My hypothesis is: yes it does, because while both are capable of accumulating errors, ValidationT returns Either a success OR a set of failures but cannot return both a success and a set of errors.
Arguably in any use case we could just keep our resultant type
:: [Either a b]however this would be an enhancement to view this result as a Monad, a Bifunctor and likely more (although my knowledge of theory stops here)Beta Was this translation helpful? Give feedback.
All reactions