Comments (5)
@ysangkok I updated bounds of optics-th
with a revision, that should be enough.
from optics.
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.
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.
Done in #480
from optics.
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)
- Build failure in optics-extra-0.4.2 with mtl-2.3 and transformers < 0.6 HOT 8
- Drop ticks in type level constructors HOT 1
- Label optics misbehavior when defined with phantom type HOT 5
- Missing INLINE pragma on castOptic? HOT 27
- Add a function to traverse the contents of a lens HOT 6
- Clarify makeFieldLabels prefix requirements
- over' and iover' pretend to work with incompatible optics
- Strictify traversals?
- Improve type errors
- Tests failing on GHC 9.4 on current Hackage release (0.4.2) HOT 3
- Unwrapping newtype should be easier than `coercedTo`. HOT 5
- Document release process
- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9411 seems to break us HOT 5
- Performance best practices regarding lens vs lensVL and Optics.TH? HOT 2
- Improve documentation on what names are generated by the various functions
- `makeFieldLabelsNoPrefix` throws error on `Network.Wai.Handler.Warp.Internal.Settings` HOT 6
- template-haskell-optics support for th-abstraction-0.6 HOT 1
- Allow dependencies bundled with GHC-9.8 HOT 3
- Versioning HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optics.