Skip to content
Snippets Groups Projects
Commit fb415b18 authored by Sebastian Graf's avatar Sebastian Graf
Browse files

Add Pretty.zeroWidth{F,P}Text, use it in Cmm Ppr

This is ultimately so that we can drop the length field of `FastString`.
The Cmm pretty printer doesn't look at the width anyway, so eagerly
computing it is redundant.

There are a multitude of occurrences of `text` in `compiler/GHC/Cmm`,
but they mostly rewrite to `ptext` anyway, where computing the length
isn't particularly expensive, so I refrained from changing these
occurrences to `zeroWidthText` for the time being.

From the three proposed approaches in
#17069 (comment 259689)
this one seemed like the simplest and least intrusive; plus, there is
already precedent with `Pretty.zeroWidthText`.

Fixes #17069.
parent abc02b40
No related branches found
No related tags found
No related merge requests found
Pipeline #17176 passed with warnings
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment