diff --git a/Elm.cabal b/Elm.cabal index ccff356e3..663beb654 100644 --- a/Elm.cabal +++ b/Elm.cabal @@ -1,5 +1,5 @@ Name: Elm -Version: 0.8.0.2 +Version: 0.8.0.3 Synopsis: The Elm language module. Description: Elm aims to make client-side web-development more pleasant. It is a statically/strongly typed, functional reactive diff --git a/compiler/Gen/CompileToJS.hs b/compiler/Gen/CompileToJS.hs index 3c0962096..101f20f21 100644 --- a/compiler/Gen/CompileToJS.hs +++ b/compiler/Gen/CompileToJS.hs @@ -272,7 +272,8 @@ jsLet defs e' = do ds <- jsDefs defs where jsDefs defs = mapM toJS (sortBy f defs) f a b = compare (valueOf a) (valueOf b) - valueOf (FnDef _ args _) = min 1 (length args) + valueOf (FnDef _ [] _) = 2 + valueOf (FnDef _ _ _) = 1 valueOf (OpDef _ _ _ _) = 1 caseToJS span e ps = do