Fix foldr1 bug (wrong base case). Reveal isClickedOn
in Signal.Mouse. Bump version number.
This commit is contained in:
parent
c3ec869afb
commit
03245c286a
5 changed files with 23 additions and 19 deletions
|
@ -127,17 +127,20 @@ var List = function() {
|
|||
}(_temp_50)
|
||||
}
|
||||
}
|
||||
function foldr1(f_53) {
|
||||
return function(_temp_54) {
|
||||
return function(v) {
|
||||
if("Cons" !== v[0]) {
|
||||
return undefined
|
||||
}else {
|
||||
var x_55 = v[1];
|
||||
var xs_56 = v[2];
|
||||
return foldr(f_53)(x_55)(xs_56)
|
||||
}
|
||||
}(_temp_54)
|
||||
function foldr1(f) {
|
||||
return function(xs) {
|
||||
if (xs[0] === "Nil") { throw "'foldr1' requires an non-empty list." }
|
||||
if (xs[0] !== "Cons") { throwError('foldr1'); }
|
||||
var arr = [];
|
||||
while (xs[0] === "Cons") {
|
||||
arr.push(xs[1]);
|
||||
xs = xs[2];
|
||||
}
|
||||
var acc = arr.pop();
|
||||
for (var i = arr.length; i--; ) {
|
||||
acc = f(arr[i])(acc);
|
||||
}
|
||||
return acc;
|
||||
}
|
||||
}
|
||||
function scanl(f) {
|
||||
|
|
|
@ -2,6 +2,6 @@ copy /B Guid.js+foreign\JavaScript.js+Value.js+List.js+Data.js+collage\Color.js+
|
|||
|
||||
cd ..\elm
|
||||
|
||||
copy /B ..\elm-mini.js elm-runtime-0.3.5.js
|
||||
copy /B ..\elm-mini.js elm-runtime-0.3.5.1.js
|
||||
|
||||
cabal install
|
||||
|
|
|
@ -66,8 +66,8 @@ var Signal = function() {
|
|||
y: Elm.Lift(function(p){return p[2];},[position]),
|
||||
isClicked: isClicked,
|
||||
isDown: isDown,
|
||||
clicks: clicks
|
||||
//clickedOn: clickedOn
|
||||
clicks: clicks,
|
||||
isClickedOn: clickedOn
|
||||
};
|
||||
}();
|
||||
|
||||
|
@ -193,7 +193,8 @@ var Signal = function() {
|
|||
};
|
||||
};
|
||||
return {get : fetch("GET"), post : fetch("POST"),
|
||||
gets : fetches("GET"), posts : fetches("POST") };
|
||||
gets : fetches("GET"), posts : fetches("POST")
|
||||
};
|
||||
}();
|
||||
var Random = function() {
|
||||
var inRange = function(min) { return function(max) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Name: Elm
|
||||
Version: 0.3.5
|
||||
Version: 0.3.5.1
|
||||
Synopsis: The Elm language module.
|
||||
Description: Elm aims to make client-side web-development more pleasant.
|
||||
It is a statically/strongly typed, functional reactive
|
||||
|
@ -22,7 +22,7 @@ Category: Compiler, Language
|
|||
Build-type: Simple
|
||||
|
||||
Extra-source-files: changelog.txt
|
||||
Data-files: elm-runtime-0.3.5.js
|
||||
Data-files: elm-runtime-0.3.5.1.js
|
||||
Cabal-version: >=1.8
|
||||
|
||||
source-repository head
|
||||
|
|
|
@ -35,11 +35,11 @@ elm = ELM { make = False &= help "automatically compile dependencies."
|
|||
, generate_noscript = False &= help "Add generated <noscript> tag to HTML output."
|
||||
} &=
|
||||
help "Compile Elm programs to HTML, CSS, and JavaScript." &=
|
||||
summary "The Elm Compiler v0.3.5, (c) Evan Czaplicki"
|
||||
summary "The Elm Compiler v0.3.5.1, (c) Evan Czaplicki"
|
||||
|
||||
main = do
|
||||
args <- cmdArgs elm
|
||||
mini <- getDataFileName "elm-runtime-0.3.5.js"
|
||||
mini <- getDataFileName "elm-runtime-0.3.5.1.js"
|
||||
compileArgs mini args
|
||||
|
||||
compileArgs mini (ELM _ [] _ _ _ _ _) =
|
||||
|
|
Loading…
Reference in a new issue