Comments (4)
Although I suppose maybe this is by design, so that if later constructors are added things don't break? If so, perhaps some convenience function to make it easier to define such instances manually might be helpful (if the programmer knows there will not be more constructors). The library provides instances for tuples, but only up to length 7 (I'm guessing the same function that I'm proposing here could also be useful to define those tuple instances).
from cborg.
This is by design. Actually I'm concerned that the single-constructor-single-field data types don't have a tag. The tags are not just for multiple constructors but to allow for migrations when you change the constructor in future.
from cborg.
The single-constructor-single-field special case should be eliminated. Those cases should use a tag too, otherwise there's no way to change the representation later and still be able to read old files.
from cborg.
Indeed the single-field case was eliminated in db52a11.
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.