
I use a similar idiom
newtype P b a = P ([b],Maybe a)
Note that the [b] is _outside_ the maybe (or either), this means that
the accumulated value can be propagated through failure.
Notably, <*> and `ap` have very different meanings for this which is
not true for other monads. <*> will collect [b] from both sides while
`ap` will only do the left.
John
John
On Wed, May 21, 2014 at 9:18 PM, Kim-Ee Yeoh
On Thu, May 22, 2014 at 6:58 AM, Tony Morris
wrote: http://hackage.haskell.org/package/validation-0.3.4/docs/Data-Validation.htm...
I don't understand how to use this package.
Is it because Either is an ugly name for the data type and Validation is preferable?
And AccValidation is to be used over Validation, like in Hungarian notation, to indicate (the possibility of?) a Semigroup instance on Left / Failure?
-- Kim-Ee
-- John Meacham - http://notanumber.net/