Pre-Proposal: Add Validation somewhere easily accessible

Gershom B gershomb at gmail.com
Tue Sep 23 02:29:17 UTC 2014


I wrote some about Lift, etc. back in this comonad reader post:

http://comonad.com/reader/2012/abstracting-with-applicatives/

Note that I give a more general construction than Lift, in that it produces an applicative for any Sum with an appropriate natural transformation. Note that Lift Const arises both from the initial homomorphism that sends identity to anything, and the terminal homomorphism that sends everything to const. I’m not advocating moving any of the things described in that post into transformers or the like (certainly not at the moment), but for those interested in how we build these things up, and where they come from, the post may be of some interest.

Cheers,
Gershom


On September 22, 2014 at 8:17:44 PM, Edward Kmett (ekmett at gmail.com) wrote:
> There was some discussion of retiring Constant, as it is mostly unused, and
> Const has supplanted it in common usage. It didn't happen with this last
> release of transformers.
>  
> -Edward
>  
> On Mon, Sep 22, 2014 at 7:27 PM, Joseph Abrahamson wrote:
>  
> > `Lift` is, but `Errors` should be identical, correct? It appears to work
> > exactly as I would hope in my testing, anyway. The only difference is one
> > further step unwrapping the Constant. Am I missing something major?
> >
> > Tangentially, I don’t understand why transformers defines its own Constant
> > type, though, given Const in Applicative. At least in transformers 4.0 they
> > use the built-in Eq1 classes and the like.
> >
> > Joseph
> >
> >
> > On Mon, Sep 22, 2014 at 7:12 PM, Edward Kmett wrote:
> >
> >> Lift is rather different than Validation.
> >>
> >> On Mon, Sep 22, 2014 at 3:13 PM, Roman Cheplyaka  
> >> wrote:
> >>
> >>> On 22/09/14 18:43, Andreas Abel wrote:
> >>> > UPDATE: I found that "Errors e" on
> >>> >
> >>> >
> >>> >
> >>> https://hackage.haskell.org/package/transformers-0.4.1.0/docs/Control-Applicative-Lift.html  
> >>>
> >>> Brilliant, thanks a lot! For me, having it in transformers outweighs all
> >>> the benefits that a separate package may provide (especially a package
> >>> as heavy as 'errors').
> >>>
> >>> Roman
> >>>
> >>>
> >>> _______________________________________________
> >>> Libraries mailing list
> >>> Libraries at haskell.org
> >>> http://www.haskell.org/mailman/listinfo/libraries
> >>>
> >>>
> >>
> >
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>  



More information about the Libraries mailing list