Comments (4)
Containers should work with older GHCs (Data.Functor.Identity
will be added only to base-4.8
, if I look correctly), and also with other Haskell compilers (it used to be Haskell-98 with CPP and compiler-specific stuff, today probably Haskell-2010 with CPP is the right target). Therefore, the Sequence
-specific Id
has to stay for older GHC and non-GHC compilers.
I am not sure whether it would be worth it to use type Id = Data.Functor.Identity
for GHC
base-4.8
-- is there any advantage in using Data.Functor.Identity
then the Functor/Monad/Applicative instances?
from containers.
It looks like base-4.8
is actually stealing Data.Functor.Identity
away from transformers
. If containers
is allowed to depend on transformers
for older versions, then we can use Data.Functor.Identity
regardless, and get all that code out of Data.Sequence
. The version in base-4.8
will have some coercion-based optimizations (e.g., fmap = coerce
, (<*>) = coerce
, foldMap = coerce
, foldl = coerce
), but I don't know if any of those will help anything in Data.Sequence
βthey only matter when certain sorts of polymorphism are in play.
from containers.
As containers
are a boot package (https://ghc.haskell.org/trac/ghc/wiki/Commentary/Libraries), any dependency is a big burden, so adding transformers
for saving 10 lines of code is definitely not going to happen.
Nevertheless, if using Data.Functor.Identity
on new GHCs should bring some advantage (some speedup?), we could use it, while providing Data.Sequence.Id
for other compilers.
from containers.
Fixed by #76
from containers.
Related Issues (20)
- Symmetric difference for sets
- Incorrect order of Applicative actions in mergeA when using filterAMissing HOT 4
- `IntMap` `isProperSubmapOfBy` test failure HOT 4
- More accurate Set and Map size warnings HOT 3
- Complexity of IntMap-IntMap operations
- Is this repo up to date? HOT 7
- Consider maintaining the x.y.z.a versioning HOT 7
- Rewrite rules for IntMap: intersectionWithKey/mapWithKey HOT 8
- Faster Eq and Ord HOT 4
- Tidy up IntSet/IntMap bitwise stuff
- Improve strictness tests HOT 4
- Data.Map.Strict.mergeWithKey does not force the result of the combining function HOT 5
- Add "Unsafe" modules HOT 6
- mapKeys can be more efficient HOT 1
- Data.Map.Internal does not export insertMin HOT 1
- Repo: remove merged branches?
- Contribution guide outdated?
- Potential memory optimization for IntMap and IntSet HOT 8
- Errors when trying to generate a test coverage report HOT 10
- Full IntSets? HOT 5
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 containers.