Re: [core libraries] Re: Proposal: Debug.Trace.traceWith

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [core libraries] Re: Proposal: Debug.Trace.traceWith

Gershom Bazerman
From: Joachim Breitner <[hidden email]>

> But on the other hand, pointfree.io tells me that you can write
> 
> trace =<< f
> trace =<< show . f
> 
> so I'm not sure how urgent these are.

Nifty! If we add this prominently to the docs in Data.Trace, wouldn’t
that suit us better?

If I’m not mistaken, those make use of the unwrapped reader monad? In my opinion, that is an instance that is confusing and unidiomatic to many people. I don’t think that “easy to write with unwrapped reader” is the same as “easy to write” (or “easy to understand”). I wouldn’t want core docs to recommend this as an approach. 

-g


_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: [core libraries] Re: Proposal: Debug.Trace.traceWith

Michael Snoyman


On Tue, Feb 20, 2018 at 8:22 AM, Gershom B <[hidden email]> wrote:
From: Joachim Breitner <[hidden email]>

> But on the other hand, pointfree.io tells me that you can write
> 
> trace =<< f
> trace =<< show . f
> 
> so I'm not sure how urgent these are.

Nifty! If we add this prominently to the docs in Data.Trace, wouldn’t
that suit us better?

If I’m not mistaken, those make use of the unwrapped reader monad? In my opinion, that is an instance that is confusing and unidiomatic to many people. I don’t think that “easy to write with unwrapped reader” is the same as “easy to write” (or “easy to understand”). I wouldn’t want core docs to recommend this as an approach. 

-g



I agree with Gershom.

Michael

_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: [core libraries] Re: Proposal: Debug.Trace.traceWith

Henning Thielemann

On Tue, 20 Feb 2018, Michael Snoyman wrote:

> On Tue, Feb 20, 2018 at 8:22 AM, Gershom B <[hidden email]> wrote:
>
> > If I’m not mistaken, those make use of the unwrapped reader monad? In
> > my opinion, that is an instance that is confusing and unidiomatic to
> > many people. I don’t think that “easy to write with unwrapped reader”
> > is the same as “easy to write” (or “easy to understand”). I wouldn’t
> > want core docs to recommend this as an approach. 
>
> I agree with Gershom.
>
> Michael
+1
_______________________________________________
Libraries mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries