mrkkrp / modern-uri

Modern library for working with URIs
Other
68 stars 18 forks source link

Doesn't build with GHC-9.0 #34

Closed recursion-ninja closed 3 years ago

recursion-ninja commented 3 years ago

The modern-uri library doesn't build with ghc-9.0-rc1. When trying to build with the new compiler, the following compilation errors occur:

Text/URI/Types.hs:126:10: error:
    • Couldn't match type ‘m’ with ‘TH.Q’
      Expected: URI -> m TH.Exp
        Actual: URI -> TH.Q TH.Exp
      ‘m’ is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *). TH.Quote m => URI -> m TH.Exp
        at Text/URI/Types.hs:126:3-6
    • In the expression: liftData
      In an equation for ‘TH.lift’: TH.lift = liftData
      In the instance declaration for ‘TH.Lift URI’
    • Relevant bindings include
        lift :: URI -> m TH.Exp (bound at Text/URI/Types.hs:126:3)
    |
126 |   lift = liftData
    |          ^^^^^^^^

Text/URI/Types.hs:129:15: error:
    • Couldn't match type ‘TH.TExp a0’ with ‘URI’
      Expected: URI -> TH.Code m URI
        Actual: URI -> 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 URI’
    |
129 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Text/URI/Types.hs:169:10: error:
    • Couldn't match type ‘m’ with ‘TH.Q’
      Expected: Authority -> m TH.Exp
        Actual: Authority -> TH.Q TH.Exp
      ‘m’ is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *).
                     TH.Quote m =>
                     Authority -> m TH.Exp
        at Text/URI/Types.hs:169:3-6
    • In the expression: liftData
      In an equation for ‘TH.lift’: TH.lift = liftData
      In the instance declaration for ‘TH.Lift Authority’
    • Relevant bindings include
        lift :: Authority -> m TH.Exp (bound at Text/URI/Types.hs:169:3)
    |
169 |   lift = liftData
    |          ^^^^^^^^

Text/URI/Types.hs:172:15: error:
    • Couldn't match type ‘TH.TExp a1’ with ‘Authority’
      Expected: Authority -> TH.Code m Authority
        Actual: Authority -> TH.Code m (TH.TExp a1)
    • 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 Authority’
    |
172 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Text/URI/Types.hs:195:10: error:
    • Couldn't match type ‘m’ with ‘TH.Q’
      Expected: UserInfo -> m TH.Exp
        Actual: UserInfo -> TH.Q TH.Exp
      ‘m’ is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *). TH.Quote m => UserInfo -> m TH.Exp
        at Text/URI/Types.hs:195:3-6
    • In the expression: liftData
      In an equation for ‘TH.lift’: TH.lift = liftData
      In the instance declaration for ‘TH.Lift UserInfo’
    • Relevant bindings include
        lift :: UserInfo -> m TH.Exp (bound at Text/URI/Types.hs:195:3)
    |
195 |   lift = liftData
    |          ^^^^^^^^

Text/URI/Types.hs:198:15: error:
    • Couldn't match type ‘TH.TExp a2’ with ‘UserInfo’
      Expected: UserInfo -> TH.Code m UserInfo
        Actual: UserInfo -> TH.Code m (TH.TExp a2)
    • 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 UserInfo’
    |
198 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Text/URI/Types.hs:221:10: error:
    • Couldn't match type ‘m’ with ‘TH.Q’
      Expected: QueryParam -> m TH.Exp
        Actual: QueryParam -> TH.Q TH.Exp
      ‘m’ is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *).
                     TH.Quote m =>
                     QueryParam -> m TH.Exp
        at Text/URI/Types.hs:221:3-6
    • In the expression: liftData
      In an equation for ‘TH.lift’: TH.lift = liftData
      In the instance declaration for ‘TH.Lift QueryParam’
    • Relevant bindings include
        lift :: QueryParam -> m TH.Exp (bound at Text/URI/Types.hs:221:3)
    |
221 |   lift = liftData
    |          ^^^^^^^^

Text/URI/Types.hs:224:15: error:
    • Couldn't match type ‘TH.TExp a3’ with ‘QueryParam’
      Expected: QueryParam -> TH.Code m QueryParam
        Actual: QueryParam -> TH.Code m (TH.TExp a3)
    • 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 QueryParam’
    |
224 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Text/URI/Types.hs:267:10: error:
    • Couldn't match type ‘m’ with ‘TH.Q’
      Expected: RText l -> m TH.Exp
        Actual: RText l -> TH.Q TH.Exp
      ‘m’ is a rigid type variable bound by
        the type signature for:
          TH.lift :: forall (m :: * -> *). TH.Quote m => RText l -> m TH.Exp
        at Text/URI/Types.hs:267:3-6
    • In the expression: liftData
      In an equation for ‘TH.lift’: TH.lift = liftData
      In the instance declaration for ‘TH.Lift (RText l)’
    • Relevant bindings include
        lift :: RText l -> m TH.Exp (bound at Text/URI/Types.hs:267:3)
    |
267 |   lift = liftData
    |          ^^^^^^^^

Text/URI/Types.hs:270:15: error:
    • Couldn't match type: TH.TExp a4
                     with: RText l
      Expected: RText l -> TH.Code m (RText l)
        Actual: RText l -> TH.Code m (TH.TExp a4)
    • 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 (RText l)’
    • Relevant bindings include
        liftTyped :: RText l -> TH.Code m (RText l)
          (bound at Text/URI/Types.hs:270:3)
    |
270 |   liftTyped = TH.unsafeTExpCoerce . TH.lift
    |