Comments (3)
@raehik what error are you seeing?
I wonder if I am running into the same thing, coming via nix build
following instructions generated w/ cabal2nix
(which presumably uses the hackage release) w/ GHC 9.4.3:
Building library for optics-0.4.2..
[1 of 1] Compiling Optics ( src/Optics.hs, dist/build/Optics.o, dist/build/Optics.dyn_o )
[1 of 1] Compiling Optics ( src/Optics.hs, dist/build/Optics.p_o )
Preprocessing test suite 'optics-tests' for optics-0.4.2..
Building test suite 'optics-tests' for optics-0.4.2..
[1 of 9] Compiling Optics.Tests.Properties ( tests/Optics/Tests/Properties.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Properties.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Properties.dyn_o )
[2 of 9] Compiling Optics.Tests.Utils ( tests/Optics/Tests/Utils.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Utils.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Utils.dyn_o )
[3 of 9] Compiling Optics.Tests.Misc ( tests/Optics/Tests/Misc.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Misc.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Misc.dyn_o )
[4 of 9] Compiling Optics.Tests.Labels.TH ( tests/Optics/Tests/Labels/TH.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Labels/TH.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Labels/TH.dyn_o )
[5 of 9] Compiling Optics.Tests.Labels.Generic ( tests/Optics/Tests/Labels/Generic.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Labels/Generic.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Labels/Generic.dyn_o )
tests/Optics/Tests/Labels/Generic.hs:72:15: error:
Ambiguous occurrence ‘name’
It could refer to
either the field ‘name’ of record ‘Human’,
defined at tests/Optics/Tests/Labels/Generic.hs:27:5
or the field ‘name’ of record ‘Fish’,
defined at tests/Optics/Tests/Labels/Generic.hs:22:16
or the field ‘name’ of record ‘Mammal’,
defined at tests/Optics/Tests/Labels/Generic.hs:17:11
|
72 | label1rhs s = name (s :: Human a)
| ^^^^
tests/Optics/Tests/Labels/Generic.hs:80:15: error:
Ambiguous occurrence ‘name’
It could refer to
either the field ‘name’ of record ‘Human’,
defined at tests/Optics/Tests/Labels/Generic.hs:27:5
or the field ‘name’ of record ‘Fish’,
defined at tests/Optics/Tests/Labels/Generic.hs:22:16
or the field ‘name’ of record ‘Mammal’,
defined at tests/Optics/Tests/Labels/Generic.hs:17:11
|
80 | label3rhs s = name (fish s :: Fish)
| ^^^^
[6 of 9] Compiling Optics.Tests.Eta ( tests/Optics/Tests/Eta.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Eta.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Eta.dyn_o )
[7 of 9] Compiling Optics.Tests.Core ( tests/Optics/Tests/Core.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Core.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Core.dyn_o )
[8 of 9] Compiling Optics.Tests.Computation ( tests/Optics/Tests/Computation.hs, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Computation.o, dist/build/optics-tests/optics-tests-tmp/Optics/Tests/Computation.dyn_o )
from optics.
confirmed that a local clone at latest (978bc13
) of the repo succeeds w/ the same GHC/cabal.
from optics.
I ran into this issue as well. Can reproduce with nix build nixpkgs#haskell.packages.ghc94.optics
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
- Support GHC 9.6 HOT 5
- 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.