on master help sign in
Merge branch 'master' of https://github.com/evancz/Elm into type-checker-improvements
89efcefevancz
Elm.cabal+1−1
@@ -1,5 +1,5 @@
1Name: Elm
1Name: Elm
2−Version: 0.8.0.2
2+Version: 0.8.0.3
3Synopsis: The Elm language module.
3Synopsis: The Elm language module.
4Description: Elm aims to make client-side web-development more pleasant.
4Description: Elm aims to make client-side web-development more pleasant.
5 It is a statically/strongly typed, functional reactive
5 It is a statically/strongly typed, functional reactive
compiler/Gen/CompileToJS.hs+2−1
@@ -272,7 +272,8 @@ jsLet defs e' = do ds <- jsDefs defs
272 where
272 where
273 jsDefs defs = mapM toJS (sortBy f defs)
273 jsDefs defs = mapM toJS (sortBy f defs)
274 f a b = compare (valueOf a) (valueOf b)
274 f a b = compare (valueOf a) (valueOf b)
275− valueOf (FnDef _ args _) = min 1 (length args)
275+ valueOf (FnDef _ [] _) = 2
276+ valueOf (FnDef _ _ _) = 1
276 valueOf (OpDef _ _ _ _) = 1
277 valueOf (OpDef _ _ _ _) = 1
277
278
278caseToJS span e ps = do
279caseToJS span e ps = do