Comments (7)
Just a quick observation from the trenches: it would be useful if the API exposed the "with" variants of Serialise
instances, e.g.
encodeListWith :: (a -> Encoding) -> [a] -> Encoding
instead of just
defaultEncodeList :: Serialise a => [a] -> Encoding
from cborg.
Probably the .Class
module should re-export all the useful bits of .Encoding
and .Decoding
that are useful for writing class instances. It should also export the class QC properties (which themselves do not depend on QC at all).
from cborg.
@adamgundry for what use case? For writing instances for sequence-like types?
from cborg.
Actually, decoding is probably a better example than encoding. I have a decoder that can't (conveniently) be a class instance, because it depends on values being passed in, which describe the generic schema of the CBOR data. But I still want to use the standard encoding/decoding functions for lists. Here's the relevant code in api-tools.
from cborg.
Should also decide on names, encode/decode or serialise/deserialise? The binary package uses get/put and Binary. The cereal package uses get/put and Cereal. The store package uses peek/poke and Store.
from cborg.
Frankly I think the status quo is fine.
from cborg.
I think we can safely close this now since the thing is released.
from cborg.
Related Issues (20)
- The version in repository is not the released 0.2.6.0 HOT 1
- Build failure on AArch64 HOT 3
- Allow text-2.0 in serialise HOT 3
- How about CBOR RFC(7049->8949) HOT 3
- `serialise` benchmarks fail to compile with GHC 9.0 or later
- cborg fails to compile on m1 darwin (aarch64-specific maybe?) HOT 2
- Build failures in cborg with primitive-0.7.4.0 HOT 2
- 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
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.