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

Build failure with GHC 9.0.1 #174

Closed
sjakobi opened this issue Feb 26, 2021 · 9 comments
Closed

Build failure with GHC 9.0.1 #174

sjakobi opened this issue Feb 26, 2021 · 9 comments

Comments

@sjakobi
Copy link
Member

sjakobi commented Feb 26, 2021

v0.8.0 fails to build with

src/Path/Internal.hs:120:11: error:
    • Couldn't match type ‘m’ with ‘TH.Q’
      Expected: m TH.Name
        Actual: TH.Q TH.Name
      ‘m’ is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *). TH.Quote m => Path a b -> m TH.Exp
        at src/Path/Internal.hs:117:3-6
    • In a stmt of a 'do' block:
        bn <- lookupTypeNameThrow $ tyConName btc
      In the expression:
        do let btc = typeRepTyCon $ typeRep $ mkBaseProxy p
               ttc = typeRepTyCon $ typeRep $ mkTypeProxy p
           bn <- lookupTypeNameThrow $ tyConName btc
           tn <- lookupTypeNameThrow $ tyConName ttc
           [| Path $(return (TH.LitE (TH.StringL str))) ::
                Path $(return $ TH.ConT bn) $(return $ TH.ConT tn) |]
           pending(rn) [<splice, return (TH.LitE (TH.StringL str))>,
                        <splice, return $ TH.ConT tn>, <splice, return $ TH.ConT bn>]
      In an equation for ‘TH.lift’:
          TH.lift p@(Path str)
            = do let btc = ...
                     ....
                 bn <- lookupTypeNameThrow $ tyConName btc
                 tn <- lookupTypeNameThrow $ tyConName ttc
                 ....
            where
                mkBaseProxy :: Path a b -> Proxy a
                mkBaseProxy _ = Proxy
                mkTypeProxy :: Path a b -> Proxy b
                mkTypeProxy _ = Proxy
                ....
    • Relevant bindings include
        lift :: Path a b -> m TH.Exp (bound at src/Path/Internal.hs:117:3)
    |
120 |     bn <- lookupTypeNameThrow $ tyConName btc
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Path/Internal.hs:137:15: error:
    • Couldn't match type: TH.TExp a0
                     with: Path a b
      Expected: Path a b -> TH.Code m (Path a b)
        Actual: Path a b -> TH.Code m (TH.TExp a0)
    • In the expression: TH.unsafeTExpCoerce . TH.lift
      In an equation for ‘TH.liftTyped’:
          TH.liftTyped = TH.unsafeTExpCoerce . TH.lift
      In the instance declaration for ‘TH.Lift (Path a b)’
    • Relevant bindings include
        liftTyped :: Path a b -> TH.Code m (Path a b)
          (bound at src/Path/Internal.hs:137:3)
    |
137 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I believe this was already fixed on master. It would be great to get a compatible release! :)

@NorfairKing
Copy link
Collaborator

This was supposed to be fixed in #170. Is it not?

@sjakobi
Copy link
Member Author

sjakobi commented Feb 26, 2021

This was supposed to be fixed in #170. Is it not?

Looks like it is. Could you possibly make a release?

@NorfairKing
Copy link
Collaborator

@sjakobi I can't. I think only @chrisdone can. Chris, could you make a release?

@sjakobi
Copy link
Member Author

sjakobi commented Feb 27, 2021

@NorfairKing you apparently did the release for v0.8.0. In principle I could I could do the release myself (see http://hackage.haskell.org/package/path/maintainers/) but I've been involved so little in this project in the past few years that it would feel like overstepping some kind of boundaries to me.

@NorfairKing
Copy link
Collaborator

@sjakobi Oh! I I didn't remember that. I just made #175 to see what CI says about 9.0.1

@sjakobi
Copy link
Member Author

sjakobi commented Feb 27, 2021

No worries @NorfairKing. Thanks!

@sjakobi
Copy link
Member Author

sjakobi commented Mar 12, 2021

FYI: As a Hackage trustee, I have created a revision for path-0.8.0 that prevents it from building with template-haskell-2.17.0.0: http://hackage.haskell.org/package/path-0.8.0/revisions/

@andrewufrank
Copy link

I have still the following errors - could somebody upload a new version which compiles with 9.0.1? thank you!

Configuring library for path-0.8.0..
Preprocessing library for path-0.8.0..
Building library for path-0.8.0..
[1 of 4] Compiling Path.Internal    ( src/Path/Internal.hs, dist/build/Path/Internal.o, dist/build/Path/Internal.dyn_o )

src/Path/Internal.hs:120:11: error:
    * Couldn't match type `m' with `TH.Q'
      Expected: m TH.Name
        Actual: TH.Q TH.Name
      `m' is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *). TH.Quote m => Path a b -> m TH.Exp
        at src/Path/Internal.hs:117:3-6
    * In a stmt of a 'do' block:
        bn <- lookupTypeNameThrow $ tyConName btc
      In the expression:
        do let btc = typeRepTyCon $ typeRep $ mkBaseProxy p
               ttc = typeRepTyCon $ typeRep $ mkTypeProxy p
           bn <- lookupTypeNameThrow $ tyConName btc
           tn <- lookupTypeNameThrow $ tyConName ttc
           [| Path $(return (TH.LitE (TH.StringL str))) ::
                Path $(return $ TH.ConT bn) $(return $ TH.ConT tn) |]
           pending(rn) [<splice, return (TH.LitE (TH.StringL str))>,
                        <splice, return $ TH.ConT tn>, <splice, return $ TH.ConT bn>]
      In an equation for `TH.lift':
          TH.lift p@(Path str)
            = do let btc = ...
                     ....
                 bn <- lookupTypeNameThrow $ tyConName btc
                 tn <- lookupTypeNameThrow $ tyConName ttc
                 ....
            where
                mkBaseProxy :: Path a b -> Proxy a
                mkBaseProxy _ = Proxy
                mkTypeProxy :: Path a b -> Proxy b
                mkTypeProxy _ = Proxy
                ....
    * Relevant bindings include
        lift :: Path a b -> m TH.Exp (bound at src/Path/Internal.hs:117:3)
    |
120 |     bn <- lookupTypeNameThrow $ tyConName btc
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Path/Internal.hs:137:15: error:
    * Couldn't match type: TH.TExp a0
                     with: Path a b
      Expected: Path a b -> TH.Code m (Path a b)
        Actual: Path a b -> TH.Code m (TH.TExp a0)
    * In the expression: TH.unsafeTExpCoerce . TH.lift
      In an equation for `TH.liftTyped':
          TH.liftTyped = TH.unsafeTExpCoerce . TH.lift
      In the instance declaration for `TH.Lift (Path a b)'
    * Relevant bindings include
        liftTyped :: Path a b -> TH.Code m (Path a b)
          (bound at src/Path/Internal.hs:137:3)
    |
137 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@sjakobi
Copy link
Member Author

sjakobi commented Dec 24, 2021

Closing, since path-0.9.1 is compatible with GHC 9.0.1.

Happy holidays, everyone! :)

@sjakobi sjakobi closed this as completed Dec 24, 2021
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

3 participants