Giter Site home page Giter Site logo

Comments (13)

phadej avatar phadej commented on August 16, 2024 1

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.

thoughtpolice avatar thoughtpolice commented on August 16, 2024 1

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. StaticPtrs 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.

Shimuuar avatar Shimuuar commented on August 16, 2024

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.

thoughtpolice avatar thoughtpolice commented on August 16, 2024

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.

ghorn avatar ghorn commented on August 16, 2024

+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.

dcoutts avatar dcoutts commented on August 16, 2024

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.

Shimuuar avatar Shimuuar commented on August 16, 2024

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.

ghorn avatar ghorn commented on August 16, 2024

Is the vector package part of the plan?

from cborg.

Shimuuar avatar Shimuuar commented on August 16, 2024

It is. I've aded missing instances but yet to submit PR.

from cborg.

axman6 avatar axman6 commented on August 16, 2024

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.

phadej avatar phadej commented on August 16, 2024

@ghorn, as @thoughtpolice mentioned, If Haskell Platform is the target, then: https://www.haskell.org/platform/contents.html and vector is there.

from cborg.

thoughtpolice avatar thoughtpolice commented on August 16, 2024

There are also now instances for all Data.Semigroup types in GHC 8.0+

from cborg.

thoughtpolice avatar thoughtpolice commented on August 16, 2024

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)

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.