dan-t / cabal-lenses Goto Github PK
View Code? Open in Web Editor NEWLenses and traversals for the Cabal library.
License: Other
Lenses and traversals for the Cabal library.
License: Other
Cabal-lenses specifies Cabal >=1.18.0 && <1.21
and lens >=4.0.1 && <4.1
, but neither of those restrictions seem to be necessary, actually. I've just removed them from the Cabal file, and afterwards the package built just fine with Cabal-1.16.0 (from GHC 7.6.3) and lens-4.2 (from Hackage). Are you sure those restrictions are accurate?
I'm working on an approach to Haskell development in simple editors. I need two things to make it work:
cabal-cargs
It would be nice if a single tool could do both things. Would you accept a PR that adds a flag to make cabal-cargs
print the directory of the Cabal file?
I realize that this doesn't fit with the normal operation of cabal-cargs
, so my other option would be to make a new tool that wraps cabal-cargs
and adds the extra functionality. It's really up to what you'd prefer 🙂
Hello! lens 4.4 came out recently and cabal-lens seems to want <4.4, but compilation still works and cabal-lens works. Just wanted to let you know that you can relax the upper bounds to <4.5 in your cabal project
As can be seen on https://matrix.hackage.haskell.org/#/package/cabal-lenses the version (lower) bounds for base
and transformers
were inaccurate; (see also build failures below)
In my function as Hackage Trustee I've already corrected the metadata for the affected releases accordingly (i.e. do not need to upload a new release):
Moreover, I've noticed that the major version increment over-signalling cabal-lenses-0.9.0 release merely changed the .cabal
file at http://hdiff.luite.com/cgit/cabal-lenses/diff?id=0.9.0&id2=0.8.0 even though there don't appear to be breaking changes in the spirit of the PVP. But also we have a more appropriate facility implemented in Hackage for this very use-case Hackage Metadata Revisions which helps reduce the overhead for the Hackage ecosystem.
Please let me know if you have any questions.
Configuring library for cabal-lenses-0.9.0..
Preprocessing library for cabal-lenses-0.9.0..
Building library for cabal-lenses-0.9.0..
lib/CabalLenses/Utils.hs:10:8:
Could not find module ‘Control.Monad.Trans.Except’
It is a member of the hidden package ‘transformers-compat-0.5.1.3’.
Perhaps you need to add ‘transformers-compat’ to the build-depends in your .cabal file.
It is a member of the hidden package ‘transformers-compat-0.6.2’.
Perhaps you need to add ‘transformers-compat’ to the build-depends in your .cabal file.
It is a member of the hidden package ‘transformers-0.5.5.0’.
Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file.
It is a member of the hidden package ‘transformers-0.4.3.0’.
Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
<<ghc: 356453816 bytes, 184 GCs, 11059166/32163584 avg/max bytes residency (8 samples), 85M in use, 0.00 INIT (0.00 elapsed), 0.10 MUT (0.10 elapsed), 0.26 GC (0.26 elapsed) :ghc>>
or
[ 7 of 11] Compiling CabalLenses.CondVars ( lib/CabalLenses/CondVars.hs, /tmp/matrix-worker/1546534388/dist-newstyle/build/x86_64-linux/ghc-7.4.2/cabal-lenses-0.9.0/build/CabalLenses/CondVars.o )
[ 8 of 11] Compiling CabalLenses.Traversals.Internal ( lib/CabalLenses/Traversals/Internal.hs, /tmp/matrix-worker/1546534388/dist-newstyle/build/x86_64-linux/ghc-7.4.2/cabal-lenses-0.9.0/build/CabalLenses/Traversals/Internal.o )
lib/CabalLenses/Traversals/Internal.hs:23:13: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:24:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:24:17: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:25:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:25:18:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:28:21: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:28:25: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:28:35: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:28:47: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:31:37: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:33:39: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:34:40:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:42:13: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:43:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:43:17: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:44:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:44:18:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:47:21: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:47:25: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:48:21: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:49:21: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:49:26:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:55:13: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:55:17: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:56:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:56:17:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:57:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:57:18:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:60:21: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:60:25: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:60:35: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:60:47: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:63:37: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:65:39: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:66:40:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:74:13: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:74:17: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:75:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:75:17:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:76:13: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:76:18:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
lib/CabalLenses/Traversals/Internal.hs:79:21: Not in scope: `<$>'
lib/CabalLenses/Traversals/Internal.hs:79:25: Not in scope: `pure'
lib/CabalLenses/Traversals/Internal.hs:80:21: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:81:21: Not in scope: `<*>'
lib/CabalLenses/Traversals/Internal.hs:81:26:
Not in scope: `traverse'
Perhaps you meant `reverse' (imported from Prelude)
<<ghc: 1798209856 bytes, 3286 GCs, 37971745/141919368 avg/max bytes residency (9 samples), 281M in use, 0.00 INIT (0.00 elapsed), 1.90 MUT (2.14 elapsed), 1.14 GC (1.14 elapsed) :ghc>>
compare:
makeLensesFor
[ ("packageDescription", "packageDescriptionL")
, ("genPackageFlags" , "genPackageFlagsL")
, ("condLibrary" , "condLibraryL")
, ("condExecutables" , "condExecutablesL")
, ("condTestSuites" , "condTestSuitesL")
, ("condBenchmarks" , "condBenchmarksL")
] ''GenericPackageDescription
to:
makeLensesWith (suffixedFields "L") ''GenericPackageDescription
which is easier to write, can't have typos, and (more importantly) is more future proof.
I've already implemented it. I'd be happy to merge it. as well as bump cabal to 1.22.4.
Builds with lens-4.15.1 and otherwise breaks the NixOS build (https://hydra.nixos.org/build/49538485)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.