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

hpack-convert fails to build with GHC-8.2.1 and Cabal-2.0 #14

Open
sjakobi opened this issue Aug 8, 2017 · 0 comments
Open

hpack-convert fails to build with GHC-8.2.1 and Cabal-2.0 #14

sjakobi opened this issue Aug 8, 2017 · 0 comments

Comments

@sjakobi
Copy link

sjakobi commented Aug 8, 2017

First some warnings (GHC's memory usage really blows up here):

    [ 7 of 12] Compiling Hpack.Config     ( src/Hpack/Config.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.0.2/build/Hpack/Config.o )
    
    /tmp/stack31554/hpack-convert-1.0.1/src/Hpack/Config.hs:122:19: warning: [-Wsimplifiable-class-constraints]
        • The constraint ‘HasTypeName a’ matches an instance declaration
          instance [safe] (GHC.Generics.Datatype d, Generic a,
                           Rep a ~ GHC.Generics.M1 GHC.Generics.D d m) =>
                          HasTypeName a
            -- Defined at src/Hpack/GenericsUtil.hs:21:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        • In the type signature:
            genericToJSON_ :: forall a.
                              (Generic a, GToJSON Zero (Rep a), HasTypeName a) => a -> Value
        |
    122 | genericToJSON_ :: forall a. (Generic a, GToJSON Zero (Rep a), HasTypeName a) => a -> Value
        |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    /tmp/stack31554/hpack-convert-1.0.1/src/Hpack/Config.hs:143:22: warning: [-Wsimplifiable-class-constraints]
        • The constraint ‘HasTypeName a’ matches an instance declaration
          instance [safe] (GHC.Generics.Datatype d, Generic a,
                           Rep a ~ GHC.Generics.M1 GHC.Generics.D d m) =>
                          HasTypeName a
            -- Defined at src/Hpack/GenericsUtil.hs:21:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        • In the type signature:
            genericParseJSON_ :: forall a.
                                 (Generic a, GFromJSON Zero (Rep a), HasTypeName a) =>
                                 Value -> Parser a
        |
    143 | genericParseJSON_ :: forall a. (Generic a, GFromJSON Zero (Rep a), HasTypeName a) => Value -> Parser a
        |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    /tmp/stack31554/hpack-convert-1.0.1/src/Hpack/Config.hs:166:11: warning: [-Wsimplifiable-class-constraints]
        • The constraint ‘HasTypeName a’ matches an instance declaration
          instance [safe] (GHC.Generics.Datatype d, Generic a,
                           Rep a ~ GHC.Generics.M1 GHC.Generics.D d m) =>
                          HasTypeName a
            -- Defined at src/Hpack/GenericsUtil.hs:21:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        • When checking the class method:
            fieldNames :: forall a. HasFieldNames a => Proxy a -> [FieldName]
          In the class declaration for ‘HasFieldNames’
        |
    166 |   default fieldNames :: (HasTypeName a, Selectors (Rep a)) => Proxy a -> [String]
        |           ^^^^^^^^^^
    
    /tmp/stack31554/hpack-convert-1.0.1/src/Hpack/Config.hs:503:10: warning: [-Wsimplifiable-class-constraints]
        • The constraint ‘HasTypeName (Section a)’
            matches an instance declaration
          instance [safe] (GHC.Generics.Datatype d, Generic a,
                           Rep a ~ GHC.Generics.M1 GHC.Generics.D d m) =>
                          HasTypeName a
            -- Defined at src/Hpack/GenericsUtil.hs:21:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        • In the context: (Generic (Section a),
                           GToJSON Zero (Rep (Section a)), HasTypeName (Section a), ToJSON a)
          While checking an instance declaration
          In the instance declaration for ‘ToJSON (Section a)’
        |
    503 | instance (Generic (Section a), GToJSON Zero (Rep (Section a)), HasTypeName (Section a),
        |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Then the compile failure:

    [ 9 of 12] Compiling Hpack.Convert    ( src/Hpack/Convert.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.0.2/build/Hpack/Convert.o )
    
    /tmp/stack31554/hpack-convert-1.0.1/src/Hpack/Convert.hs:52:34: error:
        Not in scope: data constructor ‘Cabal.FlagName’
        Perhaps you meant one of these:
          variable ‘Cabal.flagName’ (imported from Distribution.PackageDescription),
          variable ‘Cabal.mkFlagName’ (imported from Distribution.PackageDescription),
          variable ‘Cabal.unFlagName’ (imported from Distribution.PackageDescription)
        Neither ‘Distribution.InstalledPackageInfo’, ‘Distribution.Package’, ‘Distribution.PackageDescription’, ‘Distribution.PackageDescription.Parse’, ‘Distribution.Text’ nor ‘Distribution.Version’ exports ‘FlagName’.
       |
    52 |                              let Cabal.FlagName fn = flagName
       |                                  ^^^^^^^^^^^^^^
    
    /tmp/stack31554/hpack-convert-1.0.1/src/Hpack/Convert.hs:183:17: error:
        Not in scope: data constructor ‘Cabal.FlagName’
        Perhaps you meant one of these:
          variable ‘Cabal.flagName’ (imported from Distribution.PackageDescription),
          variable ‘Cabal.mkFlagName’ (imported from Distribution.PackageDescription),
          variable ‘Cabal.unFlagName’ (imported from Distribution.PackageDescription)
        Neither ‘Distribution.InstalledPackageInfo’, ‘Distribution.Package’, ‘Distribution.PackageDescription’, ‘Distribution.PackageDescription.Parse’, ‘Distribution.Text’ nor ‘Distribution.Version’ exports ‘FlagName’.
        |
    183 |     Cabal.Flag (Cabal.FlagName fl) -> "flag(" ++ fl ++ ")"
        |                 ^^^^^^^^^^^^^^
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