DanielG / ghc-syb

Scrap Your Boilerplate instances for GHC's data types
8 stars 10 forks source link

ghc-syb-utils error during installation #22

Open ascoglio opened 6 years ago

ascoglio commented 6 years ago

When running cabal install ghc-syb-utils I get the following error. I'm completely new to Haskell, so I have no idea what this means, but there seems to be a compilation error with the library. Any idea how I can fix it?

GHC version is 8.4.3 (the current latest).

Resolving dependencies...
Configuring ghc-syb-utils-0.2.3.3...
Building ghc-syb-utils-0.2.3.3...
Failed to install ghc-syb-utils-0.2.3.3
Build log ( /Users/ines/.cabal/logs/ghc-8.4.2/ghc-syb-utils-0.2.3.3-IUVEFDznc7a5BD9bwzj1Oj.log ):
cabal: Entering directory '/var/folders/qq/qsg3wfvj3nqfzkdnn9ggp2vc0000gn/T/cabal-tmp-8763/ghc-syb-utils-0.2.3.3'
Configuring ghc-syb-utils-0.2.3.3...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for ghc-syb-utils-0.2.3.3..
Building library for ghc-syb-utils-0.2.3.3..
[1 of 1] Compiling GHC.SYB.Utils    ( GHC/SYB/Utils.hs, dist/build/GHC/SYB/Utils.o )

GHC/SYB/Utils.hs:258:64: error:
    • Could not deduce (HasSourceText (XHsChar RdrName))
        arising from a use of ‘ppr’
      from the context: Data a
        bound by the type signature for:
                   showData :: forall a. Data a => Stage -> Int -> a -> String
        at GHC/SYB/Utils.hs:229:1-49
    • In the second argument of ‘(.)’, namely ‘ppr’
      In the second argument of ‘(.)’, namely ‘showSDoc_ . ppr’
      In the second argument of ‘(.)’, namely
        ‘(++ "}") . showSDoc_ . ppr’
    |
258 |         overLit    = ("{HsOverLit:"++) . (++"}") . showSDoc_ . ppr
    |                                                                ^^^

GHC/SYB/Utils.hs:261:73: error:
    • Could not deduce (Data (XHsChar RdrName))
        arising from a use of ‘list’
      from the context: Data a
        bound by the type signature for:
                   showData :: forall a. Data a => Stage -> Int -> a -> String
        at GHC/SYB/Utils.hs:229:1-49
    • In the first argument of ‘(.)’, namely ‘list’
      In the second argument of ‘(.)’, namely ‘list . bagToList’
      In the second argument of ‘(.)’, namely
        ‘(++ "}") . list . bagToList’
    |
261 |         bagRdrName = ("{Bag(Located (HsBind RdrName)): "++) . (++"}") . list . bagToList 
    |                                                                         ^^^^

GHC/SYB/Utils.hs:263:70: error:
    • Could not deduce (Data (XHsChar Name))
        arising from a use of ‘list’
      from the context: Data a
        bound by the type signature for:
                   showData :: forall a. Data a => Stage -> Int -> a -> String
        at GHC/SYB/Utils.hs:229:1-49
    • In the first argument of ‘(.)’, namely ‘list’
      In the second argument of ‘(.)’, namely ‘list . bagToList’
      In the second argument of ‘(.)’, namely
        ‘(++ "}") . list . bagToList’
    |
263 |         bagName    = ("{Bag(Located (HsBind Name)): "++) . (++"}") . list . bagToList 
    |                                                                      ^^^^

GHC/SYB/Utils.hs:265:69: error:
    • Could not deduce (Data (XHsChar Var))
        arising from a use of ‘list’
      from the context: Data a
        bound by the type signature for:
                   showData :: forall a. Data a => Stage -> Int -> a -> String
        at GHC/SYB/Utils.hs:229:1-49
    • In the first argument of ‘(.)’, namely ‘list’
      In the second argument of ‘(.)’, namely ‘list . bagToList’
      In the second argument of ‘(.)’, namely
        ‘(++ "}") . list . bagToList’
    |
265 |         bagVar     = ("{Bag(Located (HsBind Var)): "++) . (++"}") . list . bagToList 
    |                                                                     ^^^^
cabal: Leaving directory '/var/folders/qq/qsg3wfvj3nqfzkdnn9ggp2vc0000gn/T/cabal-tmp-8763/ghc-syb-utils-0.2.3.3'
cabal: Error: some packages failed to install:
ghc-syb-utils-0.2.3.3-IUVEFDznc7a5BD9bwzj1Oj failed during the building phase.
The exception was:
ExitFailure 1
hvr commented 6 years ago

@DanielG I went ahead and revised the metadata of ghc-syb-utils as people were running into this build-failure, and while at it I also fixed up past releases which also had inaccurate metadata:

before

and now it's all green (the GHC 8.4 column would be dark-green now instead of red):

ghc-syb-utils 1

DanielG commented 6 years ago

@hvr thanks!