Comments (13)
http://hackage.haskell.org/package/binary-orphans (shameless plug) is a good list of inspiration what instances are good to have. Also CI
from case-insensitive
from cborg.
Are there currently instances for TypeReps and/or StaticPtrs? these will be needed for cloud haskell's Serializable class (also when's the name of that changing? =)
There are now instances for TypeRep
and TyCon
. StaticPtr
s are looked up by a StaticKey
which is just type StaticKey = Fingerprint
which is also handled, so, basically, yes this should all be fine.
from cborg.
I've started to add instances for all base data types.
What data format should newtype wrappers should use? Same format as underlying type or wrap it list?
from cborg.
What data format should newtype wrappers should use? Same format as underlying type or wrap it list?
I say wrap it, IMO. @dcoutts ?
from cborg.
+1 wrap it to give newtypes more type safety when deserialising
I changed my mind. The point of newtypes is to have no runtime overhead by having identical runtime representation to the wrapped type.
from cborg.
I don't think newtype
is special. The question about whether to use the standard constructor pattern or an more compact but non-upgradable representation comes down to the question: could the representation of this type ever possibly change? If the answer is no it cannot ever change then it's ok to use a more compact but non-upgradable representation.
from cborg.
Here is list of missing instances for data types on which package depends:
array
- UArray
- Array
bytestring
- Lazy bytestring
text
- Lazy text
containers
- Forgotten and unloved Data.Tree.Tree
time
Basically all types. There're a lot of them
from cborg.
Is the vector
package part of the plan?
from cborg.
It is. I've aded missing instances but yet to submit PR.
from cborg.
Are there currently instances for TypeReps and/or StaticPtrs? these will be needed for cloud haskell's Serializable class (also when's the name of that changing? =)
from cborg.
@ghorn, as @thoughtpolice mentioned, If Haskell Platform is the target, then: https://www.haskell.org/platform/contents.html and vector
is there.
from cborg.
There are also now instances for all Data.Semigroup
types in GHC 8.0+
from cborg.
We've implemented a lot of these; Vector is coming up soon now that Duncan merged the ST changes, and I believe the major outliers otherwise are array
and some of the time
types.
Thus, I'm closing this for now, and individual requests for core instances can be filed as new tickets.
from cborg.
Related Issues (20)
- Support GHC 9.4 HOT 1
- cborg-0.2.6+ fails to build for 32bit: Couldn't match expected type βInt64#β with actual type βInt#β etc HOT 3
- Alternative tags have now been standardised
- Build error on ghc 9.2.2 HOT 2
- `serialise` `versus` benchmark fails to parse internal cabal libraries
- Allow vector-0.13 (in serialise) HOT 2
- Add instances for wide-word
- cborg-0.2.8.0 fails to build with 32bit ghc9 HOT 2
- Support base-4.18, strict-0.5, these-1.2, criterion-1.6 (i.e. GHC-9.6) HOT 2
- ghc-9.4 build error on M1 HOT 6
- Test `decodeValue` against `Reference.termToJson`.
- hPutSerialise should use hPutBuilder? HOT 1
- Encoding allocates too many blocks in old generation HOT 3
- Remove dependency on `aeson-pretty`
- fromFlatTerm impl of PeekTokenType is insufficently precise
- Support ghc-9.8.1 HOT 4
- serialise: Usage without requiring `Serialise` instances HOT 3
- serialise: allow tar-0.6
- serialise: allow zlib-0.7
- Versions on master have fallen behind Hackage
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 cborg.