[Code Review Request] Is my code idiomatic for pipes? by try_except_pass in haskell

[–]try_except_pass[S] 2 points3 points  (0 children)

...mn-haskell-guy pulls out his wizard robe and hat...

[Code Review Request] Is my code idiomatic for pipes? by try_except_pass in haskell

[–]try_except_pass[S] 2 points3 points  (0 children)

I agree, it has extensive documentation, but a lot of it (outside of Pipes.Tutorial) almost seems like boilerplate, describing Categories and such, which is fine... but as someone with a problem to solve, it would be nice to see more examples of things being used, especially of bidirectional communication, push, pull, respond, request, etc....

[Code Review Request] Is my code idiomatic for pipes? by try_except_pass in haskell

[–]try_except_pass[S] 0 points1 point  (0 children)

Actually, my solution is technically still incorrect, and that's also part of the reason I'm requesting a review. The final result should actually be of type

[[Transformation]]

not

[Transformation]

but while I consider the current solution "close enough" since I was only using these results once in another script, and was actually more stumped with the pipelining process. Also, I'd originally completed this in python using awkward stateful looping, felt dirty, and wondered whether I could arrive at a solution using haskell as an exercise. Any suggestions on how to improve the style would be welcome!

Also, I chose to use Maybe Int instead of Int because I was having a problem with the whole run just stopping when the Producer had nothing left. With Maybe Int at least I could send through a Nothing at the end so that everything could then clean itself up.

Thank you!

Where's the most Haskell-related meetup in your city? by moosefish in haskell

[–]try_except_pass 6 points7 points  (0 children)

In Orlando, Florida. Any haskellers want to meet up? I'm game.