pufuwozu/roy — Issue #103: Comparisons of user-defined types
Author: tokland
Created: 2012-02-03 19:13:42+00:00
State: open

Simple example:

data Maybe a = Just a | Nothing

console.log(None == None)
console.log((Just "hello") == (Just "hello"))

compiles to:

var Just = function(a){this._0 = a};
var Nothing = function(){};
console.log((new None() == new None()))
console.log(((new Just("hello")) == (new Just("hello"))))

and output:

false
false

Are there plans to manage this?