Issue when trying to install

Skip to first unread message

Arun Nanduri

Nov 18, 2020, 5:49:35 PM11/18/20
to diagrams-discuss
Hello all,

First off, thank you Brent for this very nice package, I am learning a bunch from reading the docs/paper/source. I've been trying to install it so I can play with it for a while, but am running into a problem I haven't been able to Google. It could also just be a Haskell-specific problem since I'm pretty new to that as well.

When I go into a directory (running macOS) and type `cabal install diagrams` (after updating cabal), I get the following message, stored in this gist. Basically, it's telling me that it can't resolve some dependencies.

But that's confusing to me, since I haven't installed it successfully before, and I'm also running that command right after `cabal sandbox init`. So for a fresh install, should it be having trouble resolving dependencies? Is there something I can do to fix it on my end?

Thanks a lot for your help.

Francesco Ariis

Nov 19, 2020, 1:17:23 AM11/19/20
to diagrams-discuss
Hello Arun

Il 18 novembre 2020 alle 14:47 Arun Nanduri ha scritto:
> When I go into a directory (running macOS) and type `cabal install
> diagrams` (after updating cabal), I get the following message, stored in this
> gist <>.
> Basically, it's telling me that it can't resolve some dependencies.

I suspect boundaries for base have yet to be bumped. I think you can
solve it with --allow-newer meanwhile.
Let us know if it works! —F

Arun Nanduri

Nov 19, 2020, 9:04:43 AM11/19/20
to diagrams-discuss
Hi Francesco,

Thanks a lot for your advice, it helped. I tried running `cabal install diagrams --allow-newer`, and it made a lot of progress in the installation. However, when it tried to compile everything, I ran into an error on the 71st item:

[71 of 73] Compiling Diagrams.Backend.CmdLine ( src/Diagrams/Backend/CmdLine.hs, dist/dist-sandbox-49207e1b/build/Diagrams/Backend/CmdLine.o, dist/dist-sandbox-49207e1b/build/Diagrams/Backend/CmdLine.dyn_o )

src/Diagrams/Backend/CmdLine.hs:223:23: error:
    • Couldn't match expected type ‘ParseError’
                  with actual type ‘Maybe String -> ParseError’
    • Probable cause: ‘ShowHelpText’ is applied to too few arguments
      In the first argument of ‘abortOption’, namely ‘ShowHelpText’
      In the expression: abortOption ShowHelpText
      In the expression:
        abortOption ShowHelpText
          $ mconcat [long "help", short '?', help "Show this help text"]
223 | helper' = abortOption ShowHelpText $ mconcat
    |                       ^^^^^^^^^^^^
cabal: Leaving directory '/var/folders/65/b3kdpf016518_w4nwh9hxvz40000gp/T/cabal-tmp-43858/diagrams-lib-1.4.3'
cabal: Error: some packages failed to install:
diagrams-1.4-9bqvWxaY20Y30AEfwC7ius depends on diagrams-1.4 which failed to
diagrams-contrib-1.4.4-7OhCX32H3SsD0Mmslpo4Ad depends on
diagrams-contrib-1.4.4 which failed to install.
diagrams-lib-1.4.3-1fR1LFhe6YD45cwFeos83f failed during the building phase.
The exception was:
ExitFailure 1
diagrams-svg-1.4.3-CA35y7ooae56EdHY5mOzox depends on diagrams-svg-1.4.3 which
failed to install.

Some searching indicates that this isn't Diagrams-specific, for example this stack Github issue. So at this point I might be beyond the scope of this group, but still wondering if you have seen this error or know how I might get around it? Maybe there is a way in cabal to specify that it should only depend on an older version of optparse-applicative?

Thanks for your help,

Brent Yorgey

Nov 19, 2020, 5:59:16 PM11/19/20
to Arun Nanduri, diagrams-discuss
Maybe try  --allow-newer --constraint='optparse-applicative < 0.16'  ?

You received this message because you are subscribed to the Google Groups "diagrams-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Arun Nanduri

Nov 20, 2020, 9:28:53 AM11/20/20
to diagrams-discuss
Thank you Brent, that was what I needed, it installed. Looking forward to playing with Diagrams now.


Brent Yorgey

Nov 20, 2020, 3:48:04 PM11/20/20
to Arun Nanduri, diagrams-discuss
Great!  Let us know if you run into any more questions.


Reply all
Reply to author
0 new messages