2Elm.Native.Utils = function(elm) {
6 if (x === y) return true;
7 if (typeof x === "object") {
9 for (var i in x) { ++c; if (!eq(x[i],y[i])) return false; }
10 return c === Object.keys(y).length;
12 if (typeof x === 'function') {
13 throw new Error('Equality error: general function equality is ' +
14 'undecidable, and therefore, unsupported');
19 var EQ = 0, LT = 1, GT = 2, ord = ['EQ','LT','GT'];
20 function compare(x,y) { return { ctor: ord[cmp(x,y)] } }
22 if (typeof x !== 'object') return x === y ? EQ : x < y ? LT : GT;
24 if (x.ctor === "Cons" || x.ctor === "Nil") {
26 if (x.ctor === "Nil" && y.ctor === "Nil") return EQ;
27 if (x.ctor !== y.ctor) return {ctor: x.ctor==='Nil'?LT:GT};
28 var ord = cmp(x._0, y._0);
29 if (ord !== EQ) return ord;
34 if (x.ctor.slice(0,5) === 'Tuple') {
35 var n = x.ctor.slice(5) - 0;
36 var err = 'cannot compare tuples with more than 6 elements.';
37 if (n === 0) return EQ;
38 if (n >= 1) { ord = cmp(x._0, y._0); if (ord !== EQ) return ord;
39 if (n >= 2) { ord = cmp(x._1, y._1); if (ord !== EQ) return ord;
40 if (n >= 3) { ord = cmp(x._2, y._2); if (ord !== EQ) return ord;
41 if (n >= 4) { ord = cmp(x._3, y._3); if (ord !== EQ) return ord;
42 if (n >= 5) { ord = cmp(x._4, y._4); if (ord !== EQ) return ord;
43 if (n >= 6) { ord = cmp(x._5, y._5); if (ord !== EQ) return ord;
44 if (n >= 7) throw new Error('Comparison error: ' + err); } } } } } }
47 throw new Error('Comparison error: comparison is only defined on ints, ' +
48 'floats, times, chars, strings, lists of comparable values, ' +
49 'and tuples of comparable values.')
53 var Tuple0 = { ctor: "Tuple0" }
54 function Tuple2(x,y) { return { ctor = "Tuple2", _0:x, _1:y } }
57 function guid(_) { return count++ }
61 for (var i in r) { o[i] = r[i]; }
65 function remove(x,r) {
69 o._[x] = o._[x].slice(1);
70 if (o._[x].length === 0) { delete o._[x]; }
77 function replace(kvs,r) {
79 for (var i = kvs.length; i--; ) {
86 function insert(x,v,r) {
88 if (x in o) o._[x] = [o[x]].concat(x in o._ ? o._[x].slice(0) : []);
93 return elm.Native.Utils = {
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list