on master help sign in
Fix foldr1 bug (wrong base case). Reveal `isClickedOn` in Signal.Mouse. Bump version number.
03245c2evancz
core-js/List.js+14−11
@@ -127,17 +127,20 @@ var List = function() {
127 }(_temp_50)
127 }(_temp_50)
128 }
128 }
129 }
129 }
130− function foldr1(f_53) {
130+ function foldr1(f) {
131− return function(_temp_54) {
131+ return function(xs) {
132− return function(v) {
132+ if (xs[0] === "Nil") { throw "'foldr1' requires an non-empty list." }
133− if("Cons" !== v[0]) {
133+ if (xs[0] !== "Cons") { throwError('foldr1'); }
134− return undefined
135− }else {
136− var x_55 = v[1];
134+ var arr = [];
137− var xs_56 = v[2];
135+ while (xs[0] === "Cons") {
138− return foldr(f_53)(x_55)(xs_56)
136+ arr.push(xs[1]);
137+ xs = xs[2];
138+ }
139+ var acc = arr.pop();
140+ for (var i = arr.length; i--; ) {
141+ acc = f(arr[i])(acc);
139− }
142+ }
140− }(_temp_54)
143+ return acc;
141 }
144 }
142 }
145 }
143 function scanl(f) {
146 function scanl(f) {
core-js/cat.bat+1−1
@@ -2,6 +2,6 @@ copy /B Guid.js+foreign\JavaScript.js+Value.js+List.js+Data.js+collage\Color.js+
2
2
3cd ..\elm
3cd ..\elm
4
4
5−copy /B ..\elm-mini.js elm-runtime-0.3.5.js
5+copy /B ..\elm-mini.js elm-runtime-0.3.5.1.js
6
6
7cabal install
7cabal install
core-js/runtime/Signal.js+4−3
@@ -66,8 +66,8 @@ var Signal = function() {
66 y: Elm.Lift(function(p){return p[2];},[position]),
66 y: Elm.Lift(function(p){return p[2];},[position]),
67 isClicked: isClicked,
67 isClicked: isClicked,
68 isDown: isDown,
68 isDown: isDown,
69− clicks: clicks
69+ clicks: clicks,
70− //clickedOn: clickedOn
70+ isClickedOn: clickedOn
71 };
71 };
72 }();
72 }();
73
73
@@ -193,7 +193,8 @@ var Signal = function() {
193 };
193 };
194 };
194 };
195 return {get : fetch("GET"), post : fetch("POST"),
195 return {get : fetch("GET"), post : fetch("POST"),
196− gets : fetches("GET"), posts : fetches("POST") };
196+ gets : fetches("GET"), posts : fetches("POST")
197+ };
197 }();
198 }();
198 var Random = function() {
199 var Random = function() {
199 var inRange = function(min) { return function(max) {
200 var inRange = function(min) { return function(max) {
elm/Elm.cabal+2−2
@@ -1,6 +1,6 @@
1
1
2Name: Elm
2Name: Elm
3−Version: 0.3.5
3+Version: 0.3.5.1
4Synopsis: The Elm language module.
4Synopsis: The Elm language module.
5Description: Elm aims to make client-side web-development more pleasant.
5Description: Elm aims to make client-side web-development more pleasant.
6 It is a statically/strongly typed, functional reactive
6 It is a statically/strongly typed, functional reactive
@@ -22,7 +22,7 @@ Category: Compiler, Language
22Build-type: Simple
22Build-type: Simple
23
23
24Extra-source-files: changelog.txt
24Extra-source-files: changelog.txt
25−Data-files: elm-runtime-0.3.5.js
25+Data-files: elm-runtime-0.3.5.1.js
26Cabal-version: >=1.8
26Cabal-version: >=1.8
27
27
28source-repository head
28source-repository head
elm/src/Compiler.hs+2−2
@@ -35,11 +35,11 @@ elm = ELM { make = False &= help "automatically compile dependencies."
35 , generate_noscript = False &= help "Add generated <noscript> tag to HTML output."
35 , generate_noscript = False &= help "Add generated <noscript> tag to HTML output."
36 } &=
36 } &=
37 help "Compile Elm programs to HTML, CSS, and JavaScript." &=
37 help "Compile Elm programs to HTML, CSS, and JavaScript." &=
38− summary "The Elm Compiler v0.3.5, (c) Evan Czaplicki"
38+ summary "The Elm Compiler v0.3.5.1, (c) Evan Czaplicki"
39
39
40main = do
40main = do
41 args <- cmdArgs elm
41 args <- cmdArgs elm
42− mini <- getDataFileName "elm-runtime-0.3.5.js"
42+ mini <- getDataFileName "elm-runtime-0.3.5.1.js"
43 compileArgs mini args
43 compileArgs mini args
44
44
45compileArgs mini (ELM _ [] _ _ _ _ _) =
45compileArgs mini (ELM _ [] _ _ _ _ _) =