Incompatibilities with `-f-text`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the reported -f-text build failures and inspect the remaining compatibility sources: src/Text/PrettyPrint/Leijen.hs and src/Text/PrettyPrint/Annotated/Leijen.hs. Check the listed Text and renderLazy errors, then verify that the affected compatibility packages compile successfully; the ansi-terminal failures are already fixed by #279.
Written by the indexing model from the issue text.
Description
prettyprinter-compat-wl-pprint:
src/Text/PrettyPrint/Leijen.hs:181:20: error: [GHC-76037]
Not in scope: ‘NewT.renderLazy’
Note: The module ‘Prettyprinter.Render.Text’ does not export ‘renderLazy’.
Suggested fix:
Perhaps use ‘NewT.renderIO’ (imported from Prettyprinter.Render.Text)
|
181 | let rendered = NewT.renderLazy sdoc
| ^^^^^^^^^^^^^^^
prettyprinter-compat-annotated-wl-pprint:
src/Text/PrettyPrint/Annotated/Leijen.hs:115:76: error: [GHC-83865]
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected: T.Text
Actual: prettyprinter-1.7.1:Data.Text.Text
• In the first argument of ‘T.unpack’, namely ‘str’
In the first argument of ‘showString’, namely ‘(T.unpack str)’
In the second argument of ‘(.)’, namely ‘showString (T.unpack str)’
|
115 | go s d stk (SText _ str x) = go (s . showString (T.unpack str)) d stk x
| ^^^
src/Text/PrettyPrint/Annotated/Leijen.hs:131:51: error: [GHC-83865]
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected: T.Text
Actual: prettyprinter-1.7.1:Data.Text.Text
• In the first argument of ‘T.unpack’, namely ‘s’
In the first argument of ‘str’, namely ‘(T.unpack s)’
In the first argument of ‘(<++>)’, namely ‘str (T.unpack s)’
|
131 | go stk (SText _ s x) = str (T.unpack s) <++> go stk x
| ^
src/Text/PrettyPrint/Annotated/Leijen.hs:152:65: error: [GHC-83865]
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected: T.Text
Actual: prettyprinter-1.7.1:Data.Text.Text
• In the first argument of ‘T.unpack’, namely ‘s’
In the expression: T.unpack s
In the first argument of ‘mapFst’, namely ‘(T.unpack s ++)’
|
152 | go i stk (SText l s x) = mapFst (T.unpack s ++) (go (i + l) stk x)
| ^
src/Text/PrettyPrint/Annotated/Leijen.hs:174:38: error: [GHC-83865]
• Couldn't match type ‘[Char]’ with ‘T.Text’
Expected: T.Text
Actual: prettyprinter-1.7.1:Data.Text.Text
• In the second argument of ‘T.hPutStr’, namely ‘s’
In the first argument of ‘(>>)’, namely ‘T.hPutStr h s’
In the expression: T.hPutStr h s >> go x
|
174 | go (SText _ s x) = T.hPutStr h s >> go x
| ^
Fixed by #279.prettyprinter-ansi-terminal:
src/Prettyprinter/Render/Terminal/Internal.hs:158:44: error: [GHC-83865]
• Couldn't match type ‘[Char]’ with ‘Text’
Expected: Text
Actual: prettyprinter-1.7.1:Data.Text.Text
• In the first argument of ‘TLB.fromText’, namely ‘t’
In the first argument of ‘(<>)’, namely ‘TLB.fromText t’
In the expression: TLB.fromText t <> go s rest
|
158 | SText _ t rest -> TLB.fromText t <> go s rest
| ^
src/Prettyprinter/Render/Terminal/Internal.hs:211:29: error: [GHC-83865]
• Couldn't match type ‘[Char]’ with ‘Text’
Expected: Text
Actual: prettyprinter-1.7.1:Data.Text.Text
• In the second argument of ‘T.hPutStr’, namely ‘t’
In a stmt of a 'do' block: T.hPutStr h t
In the expression:
do T.hPutStr h t
go rest
|
211 | T.hPutStr h t
| ^
- Dominant language
- Haskell
- Stars
- 309
- Forks
- 43
- Avg merge
- 21h 25m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haskell-prettyprinter/prettyprinter
-
Define `vsepHard` OpenFeature request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
haskell-prettyprinter/prettyprinter#237 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Feature request
Difficulty 3/5 1-2 days Newbie friendliness 55/100
haskell-prettyprinter/prettyprinter#288 · 3 comments ·
-
Help wanted
Difficulty 5/5 Over a week Newbie friendliness 15/100
haskell-prettyprinter/prettyprinter#272 · 7 comments · 3 reactions ·
-
Feature request
Difficulty 3/5 1-2 days Newbie friendliness 45/100
haskell-prettyprinter/prettyprinter#259 · 2 comments · 1 reaction ·
All issues in haskell-prettyprinter/prettyprinter
Similar issues
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 91/100
alunduil/alunduil-chezmoi#792 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
koalaman/shellcheck#3539 ·
-
time-manager-0.4.0 Openfailure: bounds
Difficulty 1/5 Under an hour Newbie friendliness 72/100
commercialhaskell/stackage#8122 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
objectionary/phino#1350 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100