Code Monkey home page Code Monkey logo

hs-msgpack-types's Introduction

A Haskell implementation of MessagePack.

This package contains just the types and type classes for messagepack.

hs-msgpack-types's People

Contributors

bjornbugge avatar igrep avatar iphydf avatar l29ah avatar restyled-commits avatar sx91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hs-msgpack-types's Issues

`ObjectStr Text` is incompatible with pre-2.0 MessagePack spec

As the spec allows non-unicode content, while Text can't accept arbitrary bytes.

What would be a good way to augment msgpack-types to avoid forking the library or breaking code compatibility by s/Text/ByteString/? Python's msgpack library uses use_bin_type and raw options to handle the old format, but i don't see how to do similar stuff in Haskell.

Serialize empty ADT constructor as Array[code] instead of code alone

Now multiple constuctor ADT is serialized as:

  • code
  • [code, value]
  • [code, [value, ...]]

I think code alone is ambiguous. It is deserialized as integer and integer can be deserialized to Int, Float or Double. So if you have Maybe a, Nothing is 0 while Just a is [1, Object].

So I propose empty constructor serialization as [code].

Generic encoding with field names

Currently the generic encoding turns records into simple sequences of fields.

Would it make sense to change the encoding for records or provide an alternative encoding that will store records as maps, similar to what aeson does?

Consider removing QuickCheck instances from the main component

Hi.

Currently QuickCheck instances that are needed only for tests are defined in library component, meaning that everyone using data-msgpack-types will pull QuickCheck as transitive dep.

How about moving those instances into tests and removing QuickCheck dependency from the library?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.