Giter Site home page Giter Site logo

Support GHC 9.6 about optics HOT 5 CLOSED

adamgundry avatar adamgundry commented on August 14, 2024
Support GHC 9.6

from optics.

Comments (5)

arybczak avatar arybczak commented on August 14, 2024 2

@ysangkok I updated bounds of optics-th with a revision, that should be enough.

from optics.

TeofilC avatar TeofilC commented on August 14, 2024

FWIW I think you can work around that issue by removing OverloadedLabels from default-extensions in all the cabal files.

Everything except optics-sop seems to build. It fails with this message:

Show error

src/Optics/SOP.hs:58:24: error: [GHC-05617]
    • Could not deduce ‘Code s1 ~ '[xs4]’
        arising from a use of ‘productRep’
      from the context: IsProductType a xs
        bound by the type signature for:
                   lenses :: forall a (xs :: [*]).
                             IsProductType a xs =>
                             NP (WrappedLens a) xs
        at src/Optics/SOP.hs:(55,1)-(57,47)
        The type variable ‘s1’ is ambiguous
    • In the expression: productRep
      In the first argument of ‘coerce’, namely ‘(productRep %)’
      In the first argument of ‘hmap’, namely ‘(coerce (productRep %))’
   |
58 | lenses = hmap (coerce (productRep %)) (go sList)
   |                        ^^^^^^^^^^

src/Optics/SOP.hs:62:16: error: [GHC-18872]
    • Couldn't match representation of type: Optic
                                               A_Lens NoIx (NP I (x : xs5)) (NP I (x : xs5)) x x
                               with that of: Optic
                                               A_Lens '[] (NP I (a3 : xs2)) (NP I (b2 : xs2)) a3 b2
        arising from a use of ‘coerce’
        The data constructor ‘Optics.Internal.Optic.Optic’
          of newtype ‘Optic’ is not in scope
    • In the first argument of ‘(:*)’, namely ‘coerce (npHead % _I)’
      In the expression:
        coerce (npHead % _I) :* hmap (coerce (npTail %)) (go sList)
      In an equation for ‘go’:
          go SCons
            = coerce (npHead % _I) :* hmap (coerce (npTail %)) (go sList)
   |
62 |     go SCons = coerce (npHead % _I) :* hmap (coerce (npTail %)) (go sList)
   |                ^^^^^^

src/Optics/SOP.hs:62:46: error: [GHC-18872]
    • Couldn't match representation of type: Optic
                                               A_Lens NoIx (NP I (x : xs5)) (NP I (x : xs5)) a6 a6
                               with that of: Optic
                                               m2 ks2 (NP f2 (x2 : xs3)) (NP f2 (x2 : ys1)) a4 b3
        arising from a use of ‘coerce’
        The data constructor ‘Optics.Internal.Optic.Optic’
          of newtype ‘Optic’ is not in scope
    • In the first argument of ‘hmap’, namely ‘(coerce (npTail %))’
      In the second argument of ‘(:*)’, namely
        ‘hmap (coerce (npTail %)) (go sList)’
      In the expression:
        coerce (npHead % _I) :* hmap (coerce (npTail %)) (go sList)
   |
62 |     go SCons = coerce (npHead % _I) :* hmap (coerce (npTail %)) (go sList)
   |                                              ^^^^^^

src/Optics/SOP.hs:72:18: error: [GHC-18872]
    • Couldn't match representation of type: Optic
                                               A_Prism NoIx a a (NP I a6) (NP I a6)
                               with that of: Optic m1 ks1 s0 t0 a2 b1
        arising from a use of ‘coerce’
        The data constructor ‘Optics.Internal.Optic.Optic’
          of newtype ‘Optic’ is not in scope
    • In the first argument of ‘hmap’, namely
        ‘(coerce ((rep % sop) %))’
      In the expression: hmap (coerce ((rep % sop) %)) (go sList)
      In an equation for ‘npPrisms’:
          npPrisms
            = hmap (coerce ((rep % sop) %)) (go sList)
            where
                go ::
                  forall yss. SList yss -> NP (WrappedNPPrism (NS (NP I) yss)) yss
                go SNil = Nil
                go SCons = coerce _Z :* hmap (coerce (_S %)) (go sList)
    • Relevant bindings include
        npPrisms :: NP (WrappedNPPrism a) xss
          (bound at src/Optics/SOP.hs:72:1)
   |
72 | npPrisms = hmap (coerce ((rep % sop) %)) (go sList)
   |                  ^^^^^^

src/Optics/SOP.hs:76:16: error: [GHC-18872]
    • Couldn't match representation of type: Optic
                                               A_Prism
                                               NoIx
                                               (NS (NP I) (x : xs))
                                               (NS (NP I) (x : xs))
                                               (NP I x)
                                               (NP I x)
                               with that of: Optic
                                               A_Prism
                                               NoIx
                                               (NS f0 (x0 : xs0))
                                               (NS f0 (y0 : xs0))
                                               (f0 x0)
                                               (f0 y0)
        arising from a use of ‘coerce’
        The data constructor ‘Optics.Internal.Optic.Optic’
          of newtype ‘Optic’ is not in scope
    • In the first argument of ‘(:*)’, namely ‘coerce _Z’
      In the expression: coerce _Z :* hmap (coerce (_S %)) (go sList)
      In an equation for ‘go’:
          go SCons = coerce _Z :* hmap (coerce (_S %)) (go sList)
   |
76 |     go SCons = coerce _Z :* hmap (coerce (_S %)) (go sList)
   |                ^^^^^^

src/Optics/SOP.hs:76:35: error: [GHC-18872]
    • Couldn't match representation of type: Optic
                                               A_Prism
                                               NoIx
                                               (NS (NP I) (x : xs))
                                               (NS (NP I) (x : xs))
                                               (NP I a6)
                                               (NP I a6)
                               with that of: Optic
                                               m0 ks0 (NS f1 (x1 : xs1)) (NS f1 (x1 : ys0)) a1 b0
        arising from a use of ‘coerce’
        The data constructor ‘Optics.Internal.Optic.Optic’
          of newtype ‘Optic’ is not in scope
    • In the first argument of ‘hmap’, namely ‘(coerce (_S %))’
      In the second argument of ‘(:*)’, namely
        ‘hmap (coerce (_S %)) (go sList)’
      In the expression: coerce _Z :* hmap (coerce (_S %)) (go sList)
   |
76 |     go SCons = coerce _Z :* hmap (coerce (_S %)) (go sList)
   |                                   ^^^^^^

from optics.

phadej avatar phadej commented on August 14, 2024

FWIW, I'll be happy to just remove optics-sop from cabal.project. AFAIK there is no plans to release it any time soon, and even if were on the radar, I'd say it should be in separate repository.

from optics.

phadej avatar phadej commented on August 14, 2024

Done in #480

from optics.

ysangkok avatar ysangkok commented on August 14, 2024

It would be nice with a release such that people don't need to use source-repository-project. But not urgent.

from optics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.