Skip to content

fix: pTraceShowWith should not call show twice#132

Merged
cdepillabout merged 1 commit intocdepillabout:masterfrom
leoslf:master
Dec 16, 2024
Merged

fix: pTraceShowWith should not call show twice#132
cdepillabout merged 1 commit intocdepillabout:masterfrom
leoslf:master

Conversation

@leoslf
Copy link
Copy Markdown
Contributor

@leoslf leoslf commented Dec 14, 2024

Changes

  • fix: pTraceShowWith should pTraceWith instead of pTraceShow since calling pTraceShow after show would make the shown result double-quoted

@cdepillabout
Copy link
Copy Markdown
Owner

Thanks, this seems to make sense to me.

On master:

> import Debug.Trace
> traceShowWith (+ 1) (100 :: Int)
101
100
> pTraceShowWith (+ 1) (100 :: Int)
"101"
100

With this PR:

> pTraceShowWith (+ 1) (100 :: Int)
101
100

You can see that with this PR, pTraceShowWith doesn't add an extra layer of quoting, in line with traceShowWith.

@cdepillabout cdepillabout merged commit 10a64d3 into cdepillabout:master Dec 16, 2024
@cdepillabout
Copy link
Copy Markdown
Owner

Thanks!

@georgefst
Copy link
Copy Markdown
Collaborator

I missed that this had actually been fixed, and only a few days after the last release, in fact, despite presumably having been buggy since it was introduced two releases earlier...

I'm going to make a quick 4.1.4.0 release, because this is really quite an annoying bug, pTraceShowWith being arguably the most useful of all the trace functions! We don't have any other changes since 4.1.3.0.

@georgefst georgefst mentioned this pull request Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants