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

ghc 8.8 / template-haskell 2.15.0 build failure #96

Closed
deepfire opened this issue Jan 24, 2019 · 3 comments
Closed

ghc 8.8 / template-haskell 2.15.0 build failure #96

deepfire opened this issue Jan 24, 2019 · 3 comments

Comments

@deepfire
Copy link

[12 of 14] Compiling Generics.SOP.TH  ( src/Generics/SOP/TH.hs, dist/build/Generics/SOP/TH.o )

src/Generics/SOP/TH.hs:196:17: error:
    • Couldn't match expected type ‘(TypeQ -> TySynEqnQ) -> DecQ’
                  with actual type ‘Q Dec’
    • The first argument of ($) takes one argument,
      but its type ‘Q Dec’ has none
      In the expression:
        tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
      In an equation for ‘codeSyn’:
          codeSyn = tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
    |
196 |   let codeSyn = tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Generics/SOP/TH.hs:196:28: error:
    • Couldn't match type ‘Name’ with ‘Q TySynEqn’
      Expected type: TySynEqnQ
        Actual type: Name
    • In the first argument of ‘tySynInstD’, namely ‘''Code’
      In the expression: tySynInstD ''Code
      In the expression:
        tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
    |
196 |   let codeSyn = tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
    |                            ^^^^^^

src/Generics/SOP/TH.hs:196:46: error:
    • Couldn't match expected type ‘Maybe [TyVarBndr]’
                  with actual type ‘[Q Type]’
    • In the first argument of ‘tySynEqn’, namely ‘[typ]’
      In the second argument of ‘($)’, namely
        ‘tySynEqn [typ] (codeFor f cons)’
      In the expression:
        tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
    |
196 |   let codeSyn = tySynInstD ''Code $ tySynEqn [typ] (codeFor f cons)
    |                                              ^^^^^

src/Generics/SOP/TH.hs:304:3: error:
    • Couldn't match expected type ‘(TypeQ -> TySynEqnQ) -> Q Dec’
                  with actual type ‘Q Dec’
    • The function ‘tySynInstD’ is applied to two arguments,
      but its type ‘TySynEqnQ -> Q Dec’ has only one
      In the expression:
        tySynInstD
          ''DatatypeInfoOf
          (tySynEqn [typ] (metadataType' isNewtype typeName cs))
      In an equation for ‘metadataType’:
          metadataType typ isNewtype typeName cs
            = tySynInstD
                ''DatatypeInfoOf
                (tySynEqn [typ] (metadataType' isNewtype typeName cs))
    |
304 |   tySynInstD ''DatatypeInfoOf (tySynEqn [typ] (metadataType' isNewtype typeName cs))
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Generics/SOP/TH.hs:304:14: error:
    • Couldn't match type ‘Name’ with ‘Q TySynEqn’
      Expected type: TySynEqnQ
        Actual type: Name
    • In the first argument of ‘tySynInstD’, namely ‘''DatatypeInfoOf’
      In the expression:
        tySynInstD
          ''DatatypeInfoOf
          (tySynEqn [typ] (metadataType' isNewtype typeName cs))
      In an equation for ‘metadataType’:
          metadataType typ isNewtype typeName cs
            = tySynInstD
                ''DatatypeInfoOf
                (tySynEqn [typ] (metadataType' isNewtype typeName cs))
    |
304 |   tySynInstD ''DatatypeInfoOf (tySynEqn [typ] (metadataType' isNewtype typeName cs))
    |              ^^^^^^^^^^^^^^^^

src/Generics/SOP/TH.hs:304:41: error:
    • Couldn't match expected type ‘Maybe [TyVarBndr]’
                  with actual type ‘[Q Type]’
    • In the first argument of ‘tySynEqn’, namely ‘[typ]’
      In the second argument of ‘tySynInstD’, namely
        ‘(tySynEqn [typ] (metadataType' isNewtype typeName cs))’
      In the expression:
        tySynInstD
          ''DatatypeInfoOf
          (tySynEqn [typ] (metadataType' isNewtype typeName cs))
    |
304 |   tySynInstD ''DatatypeInfoOf (tySynEqn [typ] (metadataType' isNewtype typeName cs))
    |                                         ^^^^^
@deepfire deepfire changed the title ghc 8.8 / template-haskell 0.15.0 build failure ghc 8.8 / template-haskell 2.15.0 build failure Jan 24, 2019
@phadej
Copy link
Contributor

phadej commented Jan 24, 2019

The same reasoning applies as with cabal-doctest. Unreleased stuff is a moving target, until then there is a patch in head.hackage, namely https://github.com/hvr/head.hackage/blob/master/patches/generics-sop-0.4.0.1.patch

Reading through relevant sections of README will get you up to speed (use the overlay, so you don't need to patch packages one by one). Ryan (and others) had put patches for a lot of stuff there already.

@deepfire
Copy link
Author

@phadej, thank you, will try!

@deepfire
Copy link
Author

That worked, thanks!

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

2 participants