nkpart / cabal-file-th Goto Github PK
View Code? Open in Web Editor NEWTemplate haskell function to bring cabal file fields into your source.
License: BSD 3-Clause "New" or "Revised" License
Template haskell function to bring cabal file fields into your source.
License: BSD 3-Clause "New" or "Revised" License
After updating to ghc-8.10
(bundles Cabal-3.2.0.0
) I noticed that test suite does not compile:
Preprocessing test suite 'test' for cabal-file-th-0.2.7..
Building test suite 'test' for cabal-file-th-0.2.7..
[1 of 1] Compiling Main ( test/Test.hs, dist/build/test/test-tmp/Main.dyn_o )
test/Test.hs:15:95: error:
• Couldn't match type ‘Distribution.Utils.ShortText.ShortText’
with ‘[Char]’
Expected type: PackageDescription -> String
Actual type: PackageDescription
-> Distribution.Utils.ShortText.ShortText
• In the second argument of ‘(.)’, namely ‘copyright’
In the second argument of ‘packageVariableFrom’, namely
‘(packageString . copyright)’
In the expression:
packageVariableFrom
"test/test-version-interp.cabal" (packageString . copyright)
|
15 | testCopyright = $(packageVariableFrom "test/test-version-interp.cabal" (packageString . copyright))
| ^^^^^^^^^
You get nightly builds out of the deal & notifications if your project ever stops building with the rest of the packages.
We really like your package. It's super useful. Thanks!
See below
Configuring component lib from cabal-file-th-0.2.4
Preprocessing library cabal-file-th-0.2.4...
[1 of 1] Compiling Distribution.PackageDescription.TH ( Distribution/PackageDescription/TH.hs, /tmp/matrix-worker/1480465990/dist-newstyle/build/x86_64-linux/ghc-7.8.4/cabal-file-th-0.2.4/build/Distribution/PackageDescription/TH.o )
Distribution/PackageDescription/TH.hs:34:21:
Not in scope: ‘<$>’
Perhaps you meant one of these:
‘<>’ (imported from Text.PrettyPrint),
‘<+>’ (imported from Text.PrettyPrint)
I like this package. I use it everywhere I create a CLI tool. I use it to show the cabal version in the optparse-applicative help display.
Could we take a few minutes & add it to stackage.org? the instructions are on the site. It's super easy.
The benefit for you would be nightly builds with all the other (almost 1000) packages being built nightly (plus inclusion in LTS releases).
Building library for cabal-file-th-0.2.7..
[1 of 1] Compiling Distribution.PackageDescription.TH
/var/stackage/work/unpack-dir/unpacked/cabal-file-th-0.2.7-240f7246da4bace570a5a9a827da94bd4b27a2be7cd2aa37094dd335f2822ed6/Distribu
tion/PackageDescription/TH.hs:45:48: error:
Module
‘Distribution.PackageDescription.Parsec’
does not export
‘readGenericPackageDescription’
|
45 | import Distribution.PackageDescription.Parsec (readGenericPackageDescription)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Building library for cabal-file-th-0.2.4..
[1 of 1] Compiling Distribution.PackageDescription.TH ( Distribution/PackageDescription/TH.hs, dist/build/Distribution/PackageDescription/TH.o )
Distribution/PackageDescription/TH.hs:26:1: error:
Could not find module ‘Distribution.PackageDescription.Parse’
Perhaps you meant
Distribution.PackageDescription.Parsec (from Cabal-2.2.0.0)
Distribution.PackageDescription.Check (from Cabal-2.2.0.0)
Distribution.PackageDescription.Quirks (from Cabal-2.2.0.0)
Use -v to see a list of the files searched for.
|
26 | import Distribution.PackageDescription.Parse (readPackageDescription)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This package has been removed from the Stackage nightly builds. To restore, please open a PR on the Stackage github repo as usual.
Distribution/PackageDescription/TH.hs:24:1: error:
Could not find module ‘Distribution.Compat.ReadP’
Perhaps you meant
Distribution.Compat.Graph (from Cabal-3.0.0.0)
Distribution.Compat.Lens (from Cabal-3.0.0.0)
Distribution.Compat.Stack (from Cabal-3.0.0.0)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
24 | import Distribution.Compat.ReadP
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Hi, nice library, but having a small problem.
If I try something like $( packageVariable (copyright ))
, then I get an error "No instance for (Distribution.Text.Text String) arising from a use of ‘packageVariable’", presumably because String is not an instance of Distribution.Text.Text?
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.