schernichkin / partial-isomorphisms Goto Github PK
View Code? Open in Web Editor NEWPartial isomorphisms
License: BSD 3-Clause "New" or "Revised" License
Partial isomorphisms
License: BSD 3-Clause "New" or "Revised" License
Currently it doesn't compile - see commercialhaskell/stackage#7248
(just wanted to move this out of stackage - and maybe to your attention)
Preprocessing library for partial-isomorphisms-0.2.3.0..
Building library for partial-isomorphisms-0.2.3.0..
[2 of 7] Compiling Control.Isomorphism.Partial.TH
/home/curators/work/unpack-dir/unpacked/partial-isomorphisms-0.2.3.0-97fcf1b1d5b32a38bd62ab43694fb8213ead11d5ef32f51661c1306655ea911a/src/Control/Isomorphism/Partial/TH.hs:41:73: error: [GHC-83865]
• Couldn't match type ‘BndrVis’ with ‘()’
Expected: [TyVarBndr ()]
Actual: [TyVarBndr BndrVis]
• In the second argument of ‘DecInfo’, namely ‘tyVars’
In the second argument of ‘($)’, namely
‘DecInfo (ConT name) tyVars cs’
In the expression: return $ DecInfo (ConT name) tyVars cs
|
41 | decInfo (DataD _ name tyVars _ cs _) = return $ DecInfo (ConT name) tyVars cs
| ^^^^^^
/home/curators/work/unpack-dir/unpacked/partial-isomorphisms-0.2.3.0-97fcf1b1d5b32a38bd62ab43694fb8213ead11d5ef32f51661c1306655ea911a/src/Control/Isomorphism/Partial/TH.hs:42:72: error: [GHC-83865]
• Couldn't match type ‘BndrVis’ with ‘()’
Expected: [TyVarBndr ()]
Actual: [TyVarBndr BndrVis]
• In the second argument of ‘DecInfo’, namely ‘tyVars’
In the second argument of ‘($)’, namely
‘DecInfo (ConT name) tyVars [c]’
In the expression: return $ DecInfo (ConT name) tyVars [c]
|
42 | decInfo (NewtypeD _ name tyVars _ c _) = return $ DecInfo (ConT name) tyVars [c]
| ^^^^^^
In most cases partial isomorphisms not need outside syntax definition module and never get exported. Sometimes this names may clash with desirable syntax names. It should be possible to assing names to isomorphisms generated by defineIsomorphisms manually.
It could be achieved by providing defineIsomorphismsFor :: [(String, String)] -> Name -> Q [Dec]
(similar to makeLensesFor
form lens package).
Hello!
I was building this library with GHC 9.0.1 (it is a dependency of a XML library we are trying out) and I got the following error:
Building library for partial-isomorphisms-0.2.2.1..
[1 of 6] Compiling Control.Isomorphism.Partial.Unsafe ( src/Control/Isomorphism/Partial/Unsafe.hs, dist/build/Control/Isomorphism/Partial/Unsafe.o, dist/build/Control/Isomorphism/Partial/Unsafe.dyn_o )
[2 of 6] Compiling Control.Isomorphism.Partial.TH ( src/Control/Isomorphism/Partial/TH.hs, dist/build/Control/Isomorphism/Partial/TH.o, dist/build/Control/Isomorphism/Partial/TH.dyn_o )
src/Control/Isomorphism/Partial/TH.hs:37:30: error:
• Expecting one more argument to ‘TyVarBndr’
Expected a type, but ‘TyVarBndr’ has kind ‘* -> *’
• In the type ‘[TyVarBndr]’
In the definition of data constructor ‘DecInfo’
In the data declaration for ‘DecInfo’
|
37 | data DecInfo = DecInfo Type [TyVarBndr] [Con]
| ^^^^^^^^^
cabal: Failed to build partial-isomorphisms-0.2.2.1 (which is required by
exe:licence-check from licence-check-0.1.0.0). See the build log above for
details.
All the best
James
It is desirable to use applicative-like syntax in parsers, but since we use pregenerated partial isomorphisms arguments cannot be permuted so easily. It would be nice to have TH funcion for generating arguments permutation such that mkPermutation :: String -> [Int] -> Q [Dec]
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.