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

new-build returns exit code 1 (but doesn't indicate that it fails) when run in a cabal project #5974

Closed
RyanGlScott opened this issue Mar 29, 2019 · 17 comments · Fixed by #8296

Comments

@RyanGlScott
Copy link
Member

Consider this .cabal file:

cabal-version:       >=1.10
name:                cabal-sandbox
version:             0.1.0.0
build-type:          Simple

library
  exposed-modules:     CabalSandbox
  build-depends:       base, FPretty
  hs-source-dirs:      src
  default-language:    Haskell2010

I'm choosing to depend on FPretty here since it's a package that's known not to build correctly against GHC 8.4 or later. If you try building FPretty in the same directory as cabal-sandbox.cabal using new-build, then this happens:

$ /opt/cabal/3.0/bin/cabal new-build FPretty --allow-newer=base -w /opt/ghc/8.6.4/bin/ghc
Resolving dependencies...
Build profile: -w ghc-8.6.4 -O1
In order, the following will be built (use -v for more details):
 - FPretty-1.1 (lib) (requires build)
Starting     FPretty-1.1 (lib)
Building     FPretty-1.1 (lib)

That's all the output that appears. One might think that this means that FPretty-1.1 was built successfully, but it turns out that that's not the case at all. In fact, this command actually fails, which is something that you can confirm if you check the exit code:

$ echo $?
1

Why, then, does an error message not appear? Quite strange.

This happens with other commands as well, such as new-repl:

$ /opt/cabal/3.0/bin/cabal new-repl FPretty --allow-newer=base -w /opt/ghc/8.6.4/bin/ghc
Build profile: -w ghc-8.6.4 -O1
In order, the following will be built (use -v for more details):
 - FPretty-1.1 (lib) (requires build)
Starting     FPretty-1.1 (lib)
Building     FPretty-1.1 (lib)

$ echo $?
1
@sboosali
Copy link
Collaborator

sboosali commented Mar 29, 2019

does -v say anything in addition?

@RyanGlScott
Copy link
Member Author

RyanGlScott commented Mar 29, 2019

Here is the output of -v:

$ /opt/cabal/3.0/bin/cabal new-build FPretty --allow-newer=base -w /opt/ghc/8.6.4/bin/ghc -v                   
this build was affected by the following (project) config files:
Build profile: -w ghc-8.6.4 -O1
In order, the following will be built:
 - FPretty-1.1 (lib) (requires build)
creating
/home/rgscott/Documents/Hacking/Haskell/cabal-sandbox/dist-newstyle/build
creating
/home/rgscott/Documents/Hacking/Haskell/cabal-sandbox/dist-newstyle/tmp
Extracting
/home/rgscott/.cabal/packages/hackage.haskell.org/FPretty/1.1/FPretty-1.1.tar.gz
to
/home/rgscott/Documents/Hacking/Haskell/cabal-sandbox/dist-newstyle/tmp/src-13865...
Updating FPretty.cabal with the latest revision from the index.
creating
/home/rgscott/Documents/Hacking/Haskell/cabal-sandbox/dist-newstyle/tmp/src-13865/FPretty-1.1/dist
Starting     FPretty-1.1 (lib)
Using self-exec internal setup method with build-type Simple and args:
["act-as-setup","--build-type=Simple","--","configure","--verbose=2","--builddir=dist","--ghc","--prefix=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea","--bindir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/bin","--libdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/lib","--libsubdir=","--dynlibdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/lib","--libexecdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/libexec","--libexecsubdir=","--datadir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share","--datasubdir=","--docdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc","--htmldir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc/html","--haddockdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc/html","--sysconfdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/etc","--enable-library-vanilla","--disable-library-profiling","--enable-shared","--disable-static","--disable-executable-dynamic","--disable-executable-static","--disable-profiling","--profiling-detail=default","--library-profiling-detail=default","--enable-optimization","--disable-debug-info","--disable-library-for-ghci","--disable-split-sections","--disable-split-objs","--disable-executable-stripping","--disable-library-stripping","--package-db=clear","--package-db=global","--package-db=/home/rgscott/.cabal/store/ghc-8.6.4/package.db","--cid=FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea","--extra-prog-path=/home/rgscott/.cabal/bin","--dependency=base=base-4.12.0.0","--dependency=containers=containers-0.6.0.1","--disable-coverage","--exact-configuration","--with-ghc=/opt/ghc/8.6.4/bin/ghc","--with-ghc-pkg=/opt/ghc/8.6.4/bin/ghc-pkg","--ghc-option=-hide-all-packages","lib:FPretty"]
/opt/cabal/3.0/bin/cabal act-as-setup --build-type=Simple -- configure
--verbose=2 --builddir=dist --ghc
--prefix=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea
--bindir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/bin
--libdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/lib
--libsubdir=
--dynlibdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/lib
--libexecdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/libexec
--libexecsubdir=
--datadir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share
--datasubdir=
--docdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc
--htmldir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc/html
--haddockdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc/html
--sysconfdir=/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/etc
--enable-library-vanilla --disable-library-profiling --enable-shared
--disable-static --disable-executable-dynamic --disable-executable-static
--disable-profiling --profiling-detail=default
--library-profiling-detail=default --enable-optimization --disable-debug-info
--disable-library-for-ghci --disable-split-sections --disable-split-objs
--disable-executable-stripping --disable-library-stripping --package-db=clear
--package-db=global
--package-db=/home/rgscott/.cabal/store/ghc-8.6.4/package.db
--cid=FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea
--extra-prog-path=/home/rgscott/.cabal/bin --dependency=base=base-4.12.0.0
--dependency=containers=containers-0.6.0.1 --disable-coverage
--exact-configuration --with-ghc=/opt/ghc/8.6.4/bin/ghc
--with-ghc-pkg=/opt/ghc/8.6.4/bin/ghc-pkg --ghc-option=-hide-all-packages
lib:FPretty
Redirecting build log to {handle:
/home/rgscott/.cabal/logs/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea.log}
Building     FPretty-1.1 (lib)
Using self-exec internal setup method with build-type Simple and args:
["act-as-setup","--build-type=Simple","--","build","--verbose=2","--builddir=dist"]
/opt/cabal/3.0/bin/cabal act-as-setup --build-type=Simple -- build --verbose=2
--builddir=dist
Redirecting build log to {handle:
/home/rgscott/.cabal/logs/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea.log}

Here are the contents of /home/rgscott/.cabal/logs/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea.log:

Using Parsec parser
Configuring library for FPretty-1.1..
Dependency base (>=4.5 && <4.11) && ==4.12.0.0: using base-4.12.0.0
Dependency containers ==0.6.0.1: using containers-0.6.0.1
Source component graph: component lib
Configured component graph:
    component FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea
        include base-4.12.0.0
        include containers-0.6.0.1
Linked component graph:
    unit FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea
        include base-4.12.0.0
        include containers-0.6.0.1
        Text.PrettyPrint.FPretty=FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea:Text.PrettyPrint.FPretty
Ready component graph:
    definite FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea
        depends base-4.12.0.0
        depends containers-0.6.0.1
Using Cabal-3.0.0.0 compiled by ghc-8.4
Using compiler: ghc-8.6.4
Using install prefix:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea
Executables installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/bin
Libraries installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/lib
Dynamic Libraries installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/lib
Private executables installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/libexec
Data files installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share
Documentation installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/share/doc
Configuration files installed in:
/home/rgscott/.cabal/store/ghc-8.6.4/FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea/etc
Using alex version 3.2.4 found on system at: /home/rgscott/.cabal/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 7 found on system at: /usr/bin/gcc
Using ghc version 8.6.4 given by user at: /opt/ghc/8.6.4/bin/ghc
Using ghc-pkg version 8.6.4 given by user at: /opt/ghc/8.6.4/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.22.0 found on system at: /opt/ghc/8.6.4/bin/haddock
Using happy version 1.19.9 found on system at: /home/rgscott/.cabal/bin/happy
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at: /opt/ghc/8.6.4/bin/hpc
Using hsc2hs version 0.68.5 found on system at: /opt/ghc/8.6.4/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/home/rgscott/.cabal/bin/HsColour
No jhc found
Using ld found on system at: /usr/bin/ld.gold
Using pkg-config version 0.29.1 found on system at: /usr/bin/pkg-config
Using runghc version 8.6.4 found on system at: /opt/ghc/8.6.4/bin/runghc
Using strip version 2.30 found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
Component build order: library
/opt/ghc/8.6.4/bin/ghc-pkg init dist/package.conf.inplace
creating dist/build
creating dist/build/autogen
creating dist/build/autogen
Preprocessing library for FPretty-1.1..
Building library for FPretty-1.1..
creating dist/build
/opt/ghc/8.6.4/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -idist/build/global-autogen -Idist/build/autogen -Idist/build/global-autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -this-unit-id FPretty-1.1-4473e3b9f2f4f83da6038ec8c05e7ed81a882b498d2bb20c1fba679f31d187ea -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/rgscott/.cabal/store/ghc-8.6.4/package.db -package-db dist/package.conf.inplace -package-id base-4.12.0.0 -package-id containers-0.6.0.1 -XHaskell98 Text.PrettyPrint.FPretty -hide-all-packages
[1 of 1] Compiling Text.PrettyPrint.FPretty ( Text/PrettyPrint/FPretty.hs, dist/build/Text/PrettyPrint/FPretty.o )

Text/PrettyPrint/FPretty.hs:146:16: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
146 | dl <+> dr = dl <> text " " <> dr
    |                ^^

Text/PrettyPrint/FPretty.hs:146:28: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
146 | dl <+> dr = dl <> text " " <> dr
    |                            ^^

Text/PrettyPrint/FPretty.hs:150:16: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
150 | dl <$> dr = dl <> line <> dr
    |                ^^

Text/PrettyPrint/FPretty.hs:150:24: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
150 | dl <$> dr = dl <> line <> dr
    |                        ^^

Text/PrettyPrint/FPretty.hs:154:17: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
154 | dl <$$> dr = dl <> linebreak <> dr
    |                 ^^

Text/PrettyPrint/FPretty.hs:154:30: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
154 | dl <$$> dr = dl <> linebreak <> dr
    |                              ^^

Text/PrettyPrint/FPretty.hs:158:16: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
158 | dl </> dr = dl <> softline <> dr
    |                ^^

Text/PrettyPrint/FPretty.hs:158:28: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
158 | dl </> dr = dl <> softline <> dr
    |                            ^^

Text/PrettyPrint/FPretty.hs:162:17: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
162 | dl <//> dr = dl <> softbreak <> dr
    |                 ^^

Text/PrettyPrint/FPretty.hs:162:30: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
162 | dl <//> dr = dl <> softbreak <> dr
    |                              ^^

Text/PrettyPrint/FPretty.hs:187:15: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
187 | hcat = foldr1 (<>)  -- differs from PPrint
    |               ^^^^

Text/PrettyPrint/FPretty.hs:377:36: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
377 | prop0 = pretty 6 (group (text "Hi" <> line <> text "you") <> text "!") ==
    |                                    ^^

Text/PrettyPrint/FPretty.hs:377:44: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
377 | prop0 = pretty 6 (group (text "Hi" <> line <> text "you") <> text "!") ==
    |                                            ^^

Text/PrettyPrint/FPretty.hs:377:59: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
377 | prop0 = pretty 6 (group (text "Hi" <> line <> text "you") <> text "!") ==
    |                                                           ^^

Text/PrettyPrint/FPretty.hs:379:36: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
379 | prop1 = pretty 4 (group (text "hi" <> line <> text "world")) ==
    |                                    ^^

Text/PrettyPrint/FPretty.hs:379:44: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
379 | prop1 = pretty 4 (group (text "hi" <> line <> text "world")) ==
    |                                            ^^

Text/PrettyPrint/FPretty.hs:382:30: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
382 |   pretty 8 (group (text "hi" <> line <> text "world") <> text "liness") ==
    |                              ^^

Text/PrettyPrint/FPretty.hs:382:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
382 |   pretty 8 (group (text "hi" <> line <> text "world") <> text "liness") ==
    |                                      ^^

Text/PrettyPrint/FPretty.hs:382:55: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
382 |   pretty 8 (group (text "hi" <> line <> text "world") <> text "liness") ==
    |                                                       ^^

Text/PrettyPrint/FPretty.hs:385:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
385 |   take 6 (pretty 4 (group (text "hi" <> line <> text "you" <> undefined))) ==
    |                                      ^^

Text/PrettyPrint/FPretty.hs:385:46: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
385 |   take 6 (pretty 4 (group (text "hi" <> line <> text "you" <> undefined))) ==
    |                                              ^^

Text/PrettyPrint/FPretty.hs:385:60: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
385 |   take 6 (pretty 4 (group (text "hi" <> line <> text "you" <> undefined))) ==
    |                                                            ^^

Text/PrettyPrint/FPretty.hs:388:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
388 |   take 6 (pretty 4 (group (text "hi" <> line) <>
    |                                      ^^

Text/PrettyPrint/FPretty.hs:388:47: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
388 |   take 6 (pretty 4 (group (text "hi" <> line) <>
    |                                               ^^

Text/PrettyPrint/FPretty.hs:389:30: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
389 |            group (text "you" <> line) <> undefined)) ==
    |                              ^^

Text/PrettyPrint/FPretty.hs:389:39: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
389 |            group (text "you" <> line) <> undefined)) ==
    |                                       ^^

Text/PrettyPrint/FPretty.hs:392:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
392 |   take 6 (pretty 4 (group (text "hi" <> 
    |                                      ^^

Text/PrettyPrint/FPretty.hs:393:24: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
393 |            group (line <> text "you" <> undefined)))) ==
    |                        ^^

Text/PrettyPrint/FPretty.hs:393:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
393 |            group (line <> text "you" <> undefined)))) ==
    |                                      ^^

Text/PrettyPrint/FPretty.hs:396:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
396 |   take 7 (pretty 3 (group (text "hi" <> line <> 
    |                                      ^^

Text/PrettyPrint/FPretty.hs:396:46: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
396 |   take 7 (pretty 3 (group (text "hi" <> line <> 
    |                                              ^^

Text/PrettyPrint/FPretty.hs:397:24: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
397 |            group (line <> text "you" <> undefined)))) ==
    |                        ^^

Text/PrettyPrint/FPretty.hs:397:38: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
397 |            group (line <> text "you" <> undefined)))) ==
    |                                      ^^

Text/PrettyPrint/FPretty.hs:400:33: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
400 |   pretty 10 (group (text "what" <>
    |                                 ^^

Text/PrettyPrint/FPretty.hs:401:29: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
401 |     align (group (text "do" <> line <> text "you" <> line <> 
    |                             ^^

Text/PrettyPrint/FPretty.hs:401:37: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
401 |     align (group (text "do" <> line <> text "you" <> line <> 
    |                                     ^^

Text/PrettyPrint/FPretty.hs:401:51: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
401 |     align (group (text "do" <> line <> text "you" <> line <> 
    |                                                   ^^

Text/PrettyPrint/FPretty.hs:401:59: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
401 |     align (group (text "do" <> line <> text "you" <> line <> 
    |                                                           ^^

Text/PrettyPrint/FPretty.hs:402:17: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
402 |       text "do" <> align (line <> text "now?"))))) ==
    |                 ^^

Text/PrettyPrint/FPretty.hs:402:32: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
402 |       text "do" <> align (line <> text "now?"))))) ==
    |                                ^^

Text/PrettyPrint/FPretty.hs:406:33: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
406 |   pretty 10 (group (text "one " <> (align (line <> text "two" <> 
    |                                 ^^

Text/PrettyPrint/FPretty.hs:406:49: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
406 |   pretty 10 (group (text "one " <> (align (line <> text "two" <> 
    |                                                 ^^

Text/PrettyPrint/FPretty.hs:406:63: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
406 |   pretty 10 (group (text "one " <> (align (line <> text "two" <> 
    |                                                               ^^

Text/PrettyPrint/FPretty.hs:407:17: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
407 |     align (line <> text "three"))))) ==
    |                 ^^

Text/PrettyPrint/FPretty.hs:411:33: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
411 |   pretty 10 (group (text "one " <> (nest 2 (line <> text "two" <>
    |                                 ^^

Text/PrettyPrint/FPretty.hs:411:50: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
411 |   pretty 10 (group (text "one " <> (nest 2 (line <> text "two" <>
    |                                                  ^^

Text/PrettyPrint/FPretty.hs:411:64: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
411 |   pretty 10 (group (text "one " <> (nest 2 (line <> text "two" <>
    |                                                                ^^

Text/PrettyPrint/FPretty.hs:412:18: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
412 |     nest 3 (line <> text "three"))))) ==
    |                  ^^

Text/PrettyPrint/FPretty.hs:416:39: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
416 |   pretty 5 (group (nest 2 (text "one" <> line <> text "two")) <>
    |                                       ^^

Text/PrettyPrint/FPretty.hs:416:47: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
416 |   pretty 5 (group (nest 2 (text "one" <> line <> text "two")) <>
    |                                               ^^

Text/PrettyPrint/FPretty.hs:416:63: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
416 |   pretty 5 (group (nest 2 (text "one" <> line <> text "two")) <>
    |                                                               ^^

Text/PrettyPrint/FPretty.hs:417:17: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
417 |     group (line <> text "three")) ==
    |                 ^^

Text/PrettyPrint/FPretty.hs:421:25: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
421 |   pretty 10 (text "one" <> softline <> (align (group (text "two" <> line <> text "three"))) <>
    |                         ^^

Text/PrettyPrint/FPretty.hs:421:37: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
421 |   pretty 10 (text "one" <> softline <> (align (group (text "two" <> line <> text "three"))) <>
    |                                     ^^

Text/PrettyPrint/FPretty.hs:421:66: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
421 |   pretty 10 (text "one" <> softline <> (align (group (text "two" <> line <> text "three"))) <>
    |                                                                  ^^

Text/PrettyPrint/FPretty.hs:421:74: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
421 |   pretty 10 (text "one" <> softline <> (align (group (text "two" <> line <> text "three"))) <>
    |                                                                          ^^

Text/PrettyPrint/FPretty.hs:421:93: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
421 |   pretty 10 (text "one" <> softline <> (align (group (text "two" <> line <> text "three"))) <>
    |                                                                                             ^^

Text/PrettyPrint/FPretty.hs:422:14: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
422 |     softline <> text "four") ==
    |              ^^

Text/PrettyPrint/FPretty.hs:427:18: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
427 |                  <> nest 9 (line <> group (text "takes" <> line <> text "four")) 
    |                  ^^

Text/PrettyPrint/FPretty.hs:427:34: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
427 |                  <> nest 9 (line <> group (text "takes" <> line <> text "four")) 
    |                                  ^^

Text/PrettyPrint/FPretty.hs:427:57: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
427 |                  <> nest 9 (line <> group (text "takes" <> line <> text "four")) 
    |                                                         ^^

Text/PrettyPrint/FPretty.hs:427:65: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
427 |                  <> nest 9 (line <> group (text "takes" <> line <> text "four")) 
    |                                                                 ^^

Text/PrettyPrint/FPretty.hs:428:18: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
428 |                  <> line <> text "lines")) ==
    |                  ^^

Text/PrettyPrint/FPretty.hs:428:26: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at Text/PrettyPrint/FPretty.hs:115:1-29
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.FPretty.<>’,
                             defined at Text/PrettyPrint/FPretty.hs:255:1
    |
428 |                  <> line <> text "lines")) ==
    |                          ^^

@fgaz
Copy link
Member

fgaz commented Mar 30, 2019

seems similar to #5641

@jneira
Copy link
Member

jneira commented Jun 13, 2021

@RyanGlScott the possibly related #5461 is closed and maybe your issue was corrected by the same fix, could you confirm if the problem still is reproduced?
thanks!

@RyanGlScott
Copy link
Member Author

The problem still persists as of commit cdd8d97.

@Mikolaj
Copy link
Member

Mikolaj commented Jun 15, 2021

Perhaps there is some low-hanging fruit here? #6102 fixes something like that for v2-install by literally special-casing error message muting not to trigger for v2-install. If, by chance, the muting for v2-build happens in the same place, perhaps we need to extend the hardwiring to v2-build, but also understand why it applies to only some commands. If the muting happens elsewhere, probably no low-handing fruit, but establishing this would already be a progress.

@Mikolaj
Copy link
Member

Mikolaj commented Jun 15, 2021

BTW, I think this is really quite important. I'm so used to just running with -j1 whenever I want to see an error, that I easily forget how off-putting this is to newcomers and also that -j1 is not a common wisdom any more.

@WolframKahl
Copy link

WolframKahl commented Jul 26, 2021

And -j is documented as follows, by cabal help new-install:

-j --jobs[=NUM]                                         Run NUM jobs simultaneously
                                                                  (or '$ncpus' if no NUM is given).

To me, this says that -j1 should not make a difference.
(If 1 is not the default, then the help message should say that IMO.)

@fgaz
Copy link
Member

fgaz commented Jul 26, 2021

If 1 is not the default, then the help message should say that IMO

It does say that though:

or '$ncpus' if no NUM is given

@WolframKahl
Copy link

I mean the default used if no -j option is given.

@Mikolaj
Copy link
Member

Mikolaj commented Jul 26, 2021

@WolframKahl: that default comes from your ~/.cabal/config file and probably depends on cabal version that created the file. In my file it's

jobs: $ncpus

@Mikolaj
Copy link
Member

Mikolaj commented Jul 26, 2021

It's worth considering if we should say somewhere in the --help message that commandline overrides the config file. @WolframKahl: any suggestions that would help in your case when you first read the message?

@WolframKahl
Copy link

Perhaps something along the following lines?

-j --jobs[=NUM]     Run NUM jobs simultaneously
                              (or '$ncpus' if no NUM is given).
                              Without any `-j` option, the value <<read it from the config file>>
                              from your config file is used.
                              `-j1` forces error messages to be displayed;
                              all other values (including omitting `-j1`)
                              make error messages silently discarded,
                              which means that you can discover failure
                              only by inspecting the exit code,
                             or by noticing that all the links in your install directory are broken.

And also change

Installs one or more packages. This is done by installing them in the store
and symlinking/copying the executables in the directory specified by the
--installdir flag (`~/.cabal/bin/` by default). If you want the installed
executables to be available globally, make sure that the PATH environment
variable contains that directory.

to something like:

Installs one or more packages. This is done by installing them in the store
and symlinking/copying the executables in the directory specified by the
--installdir flag (`~/.cabal/bin/` by default). If you want the installed
executables to be available globally, make sure that the PATH environment
variable contains that directory. Note that the symlinks will be broken
if the build fails silently since currently error messages are suppressed unless `-j1` is passed.

(This is how I eventually found this issue, by having broken links in the installdir after apparently-successful runs of cabal new-install.)

@WolframKahl
Copy link

This issue, and the issues I traversed before getting here, are at least three years old. So it must be a feature, and is worth documenting as such.

@Mikolaj
Copy link
Member

Mikolaj commented Jul 26, 2021

Oh, great, thanks. This is a good start.

I think many (most? all?) commandline options override config file. Do we say so for all? Only in -j?

Also, the same help for options is displayed for all (?) cabal commands, of which cabal install is a problematic and rather minor one (cabal build is the normal workflow).

It would indeed be good to display the default value, but I have no idea how hard it is. E.g., how many other sources are taken into account and in what order, e.g., env vars, config, cabal.project, cabal.project.local, etc. This may be a complex feature to add and, in any case, it's worth a separate ticket (is there one already?).

@fgaz
Copy link
Member

fgaz commented Jul 26, 2021

I think that rather than putting that message hidden in the help it's better to print it in case of failure, i.e. apply this temporary fix to all other commands: e986b33

Or better yet, generalize #6102

@fgaz
Copy link
Member

fgaz commented Jul 26, 2021

By the way by looking at #5641 it seems like this issue only happened with v2-install. What changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants