
23 Jan
2013
23 Jan
'13
1:03 a.m.
Ertugrul Söylemez
writes:
There is a good reason why Haskell's type system would never have allowed to write this library. I recommend the author to try again without unsafeCoerce. It won't work.
You are right, and in fact what I wanted to do cannot be done. It requires distinguishing the final value as either a Left (result from short-circuiting) or a Right (final value). And EitherT can already do that, it just lacks a convenience function to make it easier (i.e, not having to write lots of nested if statements). -- John Wiegley FP Complete Haskell tools, training and consulting http://fpcomplete.com johnw on #haskell/irc.freenode.net