Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prettyprinter-ansi-terminal is not compatible with -text option #250

Open
BinderDavid opened this issue Feb 23, 2024 · 1 comment
Open

Comments

@BinderDavid
Copy link

Here is a minimal counterexample:

Cabal file:

counterexample.cabal:

cabal-version:      3.0
name:               counterexample
version:            0.1.0.0
license:            BSD-3-Clause
license-file:       LICENSE
author:             David Binder
maintainer:         [email protected]
build-type:         Simple
extra-doc-files:    CHANGELOG.md

common warnings
    ghc-options: -Wall

executable counterexample
    import:           warnings
    main-is:          Main.hs
    build-depends:    base ^>=4.18.0.0,
                      prettyprinter-ansi-terminal
    hs-source-dirs:   app
    default-language: Haskell2010

Cabal.project file

cabal.project

packages: counterexample.cabal
constraints: prettyprinter -text

Build errors

[1 of 4] Compiling Prettyprinter.Render.Terminal.Internal ( src/Prettyprinter/Render/Terminal/Internal.hs, dist/build/Prettyprinter/Render/Terminal/Internal.o, dist/build/Prettyprinter/Render/Terminal/Internal.dyn_o )

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
    |                             ^
Error: cabal: Failed to build prettyprinter-ansi-terminal-1.1.3 (which is
required by exe:counterexample from counterexample-0.1.0.0). See the build log
above for details.

@BinderDavid
Copy link
Author

#207 and #208 are related

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

No branches or pull requests

1 participant