| 29 Aug 2025 |
sterni (he/him) | The best solution is probably to submit a proper patch for this to upstream, using CPP. You'd want to use Text.show for text >= 2.1.2 and keep the current code for Text < 2.1.2. | 11:32:49 |
sterni (he/him) | Prelude.show would work, I guess, though it is a bit silly to implement tshow yourself if Data.Text exposes it now | 11:33:59 |
Artem | I don't think you need any CPP: with proper qualifications it should be perfectly backwards compatible. | 13:19:25 |
sterni (he/him) | sure | 16:04:05 |
sterni (he/him) | * ~~sure~~ | 16:04:30 |
sterni (he/him) | * sure | 16:04:35 |
| magic_rb changed their profile picture. | 19:30:45 |
Artem | all this text's show fallout is due to the fact that in Haskell you can't require people to import qualified. See, certain modules, including Data.Text, are designed to be imported qualified. They will say so in the documentation. But this is only a guideline. It's impossible to enforce. So, anyone who ignored this guideline, imported Data.Text unqualified, and also happened to use show from Prelude, gets blown out... And the good fix is to import Data.Text qualified and update the usages of stuff from there. An easy fix is to update the usages of show to Prelude.show. None if these two are one-line fix in general, sadly. | 19:38:03 |
maralorn | I mean I kinda think importing without import lists or unqualified should be prevented by a linter on hackage upload. | 19:43:05 |
emily | sometimes you do want that (modules specifically designed as preludes), no? | 19:43:40 |
emily | even in Rust people sometimes do glob imports for that case | 19:43:52 |