70 lines
1.2 KiB
JavaScript
70 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
var Curry = require("./curry.js");
|
|
|
|
function MakeComparableU(M) {
|
|
return M;
|
|
}
|
|
|
|
function MakeComparable(M) {
|
|
var cmp = M.cmp;
|
|
var cmp$1 = Curry.__2(cmp);
|
|
return {
|
|
cmp: cmp$1
|
|
};
|
|
}
|
|
|
|
function comparableU(cmp) {
|
|
return {
|
|
cmp: cmp
|
|
};
|
|
}
|
|
|
|
function comparable(cmp) {
|
|
var cmp$1 = Curry.__2(cmp);
|
|
return {
|
|
cmp: cmp$1
|
|
};
|
|
}
|
|
|
|
function MakeHashableU(M) {
|
|
return M;
|
|
}
|
|
|
|
function MakeHashable(M) {
|
|
var hash = M.hash;
|
|
var hash$1 = Curry.__1(hash);
|
|
var eq = M.eq;
|
|
var eq$1 = Curry.__2(eq);
|
|
return {
|
|
hash: hash$1,
|
|
eq: eq$1
|
|
};
|
|
}
|
|
|
|
function hashableU(hash, eq) {
|
|
return {
|
|
hash: hash,
|
|
eq: eq
|
|
};
|
|
}
|
|
|
|
function hashable(hash, eq) {
|
|
var hash$1 = Curry.__1(hash);
|
|
var eq$1 = Curry.__2(eq);
|
|
return {
|
|
hash: hash$1,
|
|
eq: eq$1
|
|
};
|
|
}
|
|
|
|
exports.MakeComparableU = MakeComparableU;
|
|
exports.MakeComparable = MakeComparable;
|
|
exports.comparableU = comparableU;
|
|
exports.comparable = comparable;
|
|
exports.MakeHashableU = MakeHashableU;
|
|
exports.MakeHashable = MakeHashable;
|
|
exports.hashableU = hashableU;
|
|
exports.hashable = hashable;
|
|
/* No side effect */
|