[core libraries] Re: Add taggedTrace to Debug.Trace
Yuji Yamamoto
whosekiteneverfly at gmail.com
Tue Jun 12 00:18:30 UTC 2018
Can anyone give me more feedback?
I'm interested especially in my last reply.
2018年6月8日(金) 9:19 Yuji Yamamoto <whosekiteneverfly at gmail.com>:
> Almost any formatting will do. At least I never care.
> I assume those APIs would be used for very ad-hoc use (like the other APIs
> in Debug.Trace).
> And debug codes put by such cases are deleted or disabled by NoTrace
> <https://hackage.haskell.org/package/NoTrace> package in production.
> I want handy default functions available without batteries.
> Detailed formatting for debug messages should be configured by
> third-parties' logging libraries.
>
> 2018年6月8日(金) 4:29 Andrew Martin <andrew.thaddeus at gmail.com>:
>
>> I am -1 on this. Such a function requires making a decision about
>> formatting. What does a user expect from
>>
>> > taggedTraceShowId "meganum" (42 :: Int)
>>
>> Any of these are reasonable:
>>
>> meganum: 42
>> meganum [42]
>> [meganum]: 42
>>
>> In different applications I've worked on, I've wanted different flavors
>> of something like this. Since there's no obvious choice, I don't think base
>> is a good place for such a function.
>>
>> On Thu, Jun 7, 2018 at 12:59 PM, Ben Gamari <ben at smart-cactus.org> wrote:
>>
>>> Edward Kmett <ekmett at gmail.com> writes:
>>>
>>> > What different users would do with such a prefix, how to display it,
>>> > etc. varies just enough that i’m somewhat hesitant to grow the API.
>>> > I’m a very weak -1. But I’d happily let anybody else on the committee
>>> > override that if they had a strong preference.
>>> >
>>> Right, as I mentioned I'm not sure about the tagging idea. However, I
>>> have found things of the form `(a -> String) -> a -> a` handy in the
>>> past.
>>> Then again, it's pretty trivial to open-code this when needed.
>>>
>>> Cheers,
>>>
>>> - Ben
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "haskell-core-libraries" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to haskell-core-libraries+unsubscribe at googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> -Andrew Thaddeus Martin
>>
>
>
> --
> 山本悠滋
> twitter: @igrep
> GitHub: https://github.com/igrep
> GitLab: https://gitlab.com/igrep
> Facebook: http://www.facebook.com/igrep
> Google+: https://plus.google.com/u/0/+YujiYamamoto_igrep
>
--
山本悠滋
twitter: @igrep
GitHub: https://github.com/igrep
GitLab: https://gitlab.com/igrep
Facebook: http://www.facebook.com/igrep
Google+: https://plus.google.com/u/0/+YujiYamamoto_igrep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180612/447fc0bf/attachment.html>
More information about the ghc-devs
mailing list