Skip to content

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

Open
@BinderDavid

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions