Giter VIP home page Giter VIP logo

purescript-codec's Introduction

purescript-codec

Latest release Build Status

General purpose bi-directional codecs.

Installation

bower install purescript-codec

Documentation

Module documentation is published on Pursuit.

purescript-codec's People

Contributors

garyb avatar kritzcreek avatar thomashoneyman avatar unisay avatar

Stargazers

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

Watchers

 avatar  avatar

purescript-codec's Issues

Usage instructions

How is this meant to be used? A description or example would be great to add to the docs or README.

Add a license

Although codec is a library that exists in Haskell and was the library on which this one is based, it seems like it's author has stopped working on the library.

I'd like to port this library to Haskell. Then, I can create a server that uses that ported library to serialize things and hopefully play with with this library on the PS side of things.

However, you don't have a license, so I feel like doing anything like that wouldn't end well until it's clarified.

Why is `Codec` a type rather than a type class?

I have been learning Purescript recently and I have a question if you have some time to entertain me ๐Ÿ˜…

I was implementing a toy project and before I discovered this package, I created a type class that served as a Codec definition, defining encode and decode functions.

class Codec a b e where
  encode :: a -> b
  decode :: b -> Either e a

I then create an instance of this Codec for each of the types in my domain.

Comparing my implementation to yours, I'm curious about why Codec is implemented as a type in this module rather than a type class?

PS: I know this is probably not the right place for this, let me know if there is a better place to ask such questions.

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.