Skip to content

Build failure with GHC 9.0.1 #174

@sjakobi

Description

@sjakobi

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions