tsurucapital / enummapset-th Goto Github PK
View Code? Open in Web Editor NEWTH-generated EnumSet/EnumMap wrappers around IntSet/IntMap.
License: BSD 3-Clause "New" or "Revised" License
TH-generated EnumSet/EnumMap wrappers around IntSet/IntMap.
License: BSD 3-Clause "New" or "Revised" License
Hi! Since your package has the potential to improve code quality so much, etc., etc., I'm wondering if you considered submitting it to
https://github.com/fpco/stackage
I'd do it myself, but I think they require maintainers to do that. Thanks!
Thank you for the package; the flexibility vs containers version is very useful. Unfortunately, there's a failure with slightly patched 7.7.20131203:
Building enummapset-th-0.6.0.0...
Preprocessing library enummapset-th-0.6.0.0...
[1 of 4] Compiling Data.EnumMapSetWrapper ( Data/EnumMapSetWrapper.hs, dist/build/Data/EnumMapSetWrapper.o )
[2 of 4] Compiling Data.EnumSet ( Data/EnumSet.hs, dist/build/Data/EnumSet.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package containers-0.5.3.1 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Data/EnumSet.hs:97:41:
Ambiguous occurrence ‛toList’
It could refer to either ‛Data.EnumSet.toList’,
defined at Data/EnumSet.hs:80:1
or ‛Data.IntSet.toList’,
imported from ‛Data.IntSet’ at Data/EnumSet.hs:11:1-18
(and originally defined in ‛containers-0.5.3.1:Data.IntSet.Base’)
Data/EnumSet.hs:102:14:
Ambiguous occurrence ‛fromList’
It could refer to either ‛Data.EnumSet.fromList’,
defined at Data/EnumSet.hs:81:1
or ‛Data.IntSet.fromList’,
imported from ‛Data.IntSet’ at Data/EnumSet.hs:11:1-18
(and originally defined in ‛containers-0.5.3.1:Data.IntSet.Base’)
It's even faster than just checking if intersection is empty.
Data/EnumMapSetWrapper.hs:201:13: error:
• Expecting one more argument to ‘TyVarBndr’
Expected a type, but ‘TyVarBndr’ has kind ‘* -> *’
• In the type signature: subB :: TyVarBndr -> TyVarBndr
In an equation for ‘substT’:
substT from to
= subT
where
subT :: Type -> Type
subT typ
= case typ of
VarT ((==) from -> True) -> VarT to
s `AppT` t -> subT s `AppT` subT t
ForallT tvs cxt t
-> ForallT tvs' cxt' (subT t)
where
...
_ -> typ
subB :: TyVarBndr -> TyVarBndr
subB tv
= case tv of
PlainTV ((==) from -> True) -> PlainTV to
KindedTV ((==) from -> True) k -> KindedTV to k
_ -> tv
....
|
201 | subB :: TyVarBndr -> TyVarBndr
| ^^^^^^^^^
Data/EnumMapSetWrapper.hs:201:26: error:
• Expecting one more argument to ‘TyVarBndr’
Expected a type, but ‘TyVarBndr’ has kind ‘* -> *’
• In the type signature: subB :: TyVarBndr -> TyVarBndr
In an equation for ‘substT’:
substT from to
= subT
where
subT :: Type -> Type
subT typ
= case typ of
VarT ((==) from -> True) -> VarT to
s `AppT` t -> subT s `AppT` subT t
ForallT tvs cxt t
-> ForallT tvs' cxt' (subT t)
where
...
_ -> typ
subB :: TyVarBndr -> TyVarBndr
subB tv
= case tv of
PlainTV ((==) from -> True) -> PlainTV to
KindedTV ((==) from -> True) k -> KindedTV to k
_ -> tv
....
|
201 | subB :: TyVarBndr -> TyVarBndr
| ^^^^^^^^^
Data/EnumMapSetWrapper.hs:243:30: error:
• Couldn't match type: flag0 -> TyVarBndr flag0
with: TyVarBndr Specificity
Expected: [TyVarBndr Specificity]
Actual: [flag0 -> TyVarBndr flag0]
• In the first argument of ‘ForallT’, namely ‘(ks ++ tvs)’
In the expression: ForallT (ks ++ tvs) (nub $ cxt' ++ cxt) t
In a case alternative:
ForallT tvs cxt t -> ForallT (ks ++ tvs) (nub $ cxt' ++ cxt) t
|
243 | ForallT (ks ++ tvs) (nub $ cxt' ++ cxt) t
| ^^^^^^^^^
Data/EnumMapSetWrapper.hs:243:36: error:
• Couldn't match type: TyVarBndr Specificity
with: flag0 -> TyVarBndr flag0
Expected: [flag0 -> TyVarBndr flag0]
Actual: [TyVarBndr Specificity]
• In the second argument of ‘(++)’, namely ‘tvs’
In the first argument of ‘ForallT’, namely ‘(ks ++ tvs)’
In the expression: ForallT (ks ++ tvs) (nub $ cxt' ++ cxt) t
|
243 | ForallT (ks ++ tvs) (nub $ cxt' ++ cxt) t
| ^^^
Data/EnumMapSetWrapper.hs:244:30: error:
• Couldn't match type: flag1 -> TyVarBndr flag1
with: TyVarBndr Specificity
Expected: [TyVarBndr Specificity]
Actual: [flag1 -> TyVarBndr flag1]
• In the first argument of ‘ForallT’, namely ‘ks’
In the expression: ForallT ks cxt' t
In a case alternative: t -> ForallT ks cxt' t
|
244 | t -> ForallT ks cxt' t
| ^^
cabal: Failed to build enummapset-th-0.6.2.
See https://gitlab.haskell.org/ghc/ghc/-/wikis/migration/9.0#template-haskell-217 for some guidance on fixing this.
As a Hackage trustee, I have created a revision that should prevent users from encountering this error: https://hackage.haskell.org/package/enummapset-th-0.6.2/revisions/
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.