[Haskell] ANNOUNCE: adt.js (Algebraic Data Types, JavaScript library)

code at rehno.lindeque.name code at rehno.lindeque.name
Sat Sep 15 22:18:57 CEST 2012


Hi all, I'm pleased to give you adt.js - algebraic data types for JavaScript.

* https://github.com/rehno-lindeque/adt.js (The source code & README)
* https://groups.google.com/forum/#!forum/adtjs (A place to chat)

adt.js is an unusual take on algebraic data types for JavaScript, that  
may be useful to Haskell web developers. Specifically, the adt.js  
serializer/deserializer attempts to imitate Haskell's default  
(deriving) Show and Read implementations for common data types. This  
allows you to pass data values between server-side Haskell and  
browser-side JavaScript with ease (simply apply show/read in Haskell  
and adt.serialize/adt.deserialize in JavaScript).

It differs from other attempts in that it embraces JavaScript's  
built-in types in its interfaces and makes a few less obvious design  
choices (illustrated by examples in the README).

This is more of a "I coded this and I'm finding it useful"  
announcement than an official release (or 0.0, if you will). Before  
making an official release, the idea is to dice up the library into  
multiple versions - each of which will be progressively more  
heavy-weight and implement more advanced features from the library. I  
haven't had time to implement such an advanced build system, however  
I'm already using the library for some relatively serious projects to  
be put into production at a later date.

There's also a few related libraries I'm working on (however, fair  
warning, documentation is really not great right now):

https://github.com/rehno-lindeque/adt-html.js (HTML should have been an ADT)
https://github.com/rehno-lindeque/adt-typecheck.js (Type check JS objects)

I'm a little time constrained in terms of answering questions etc  
(which I deeply regret), however I welcome contributors and will  
gladly accept/moderate pull requests.

Suggestions and feedback are more than welcome, I realize that there's  
still many possible improvements to be made. Thank you for your  
attention!

Kind regards,
Rehno




More information about the Haskell mailing list