on master help sign in
Function args were in the reverse order!
25474f8Evan Czaplicki
compiler/Generate/JavaScript.hs+1−1
@@ -201,7 +201,7 @@ instance ToJS (Expr t v) where
201 fastFunc body
201 fastFunc body
202 | length args < 2 || length args > 9 = foldr jsFunc body args
202 | length args < 2 || length args > 9 = foldr jsFunc body args
203 | otherwise = "F" ++ show (length args) ++ parens (jsFunc (commaSep args) body)
203 | otherwise = "F" ++ show (length args) ++ parens (jsFunc (commaSep args) body)
204− (args, body) = foldr depattern ([], innerBody) (zip patterns [1..])
204+ (args, body) = first reverse $ foldr depattern ([], innerBody) (zip patterns [1..])
205
205
206 depattern (pattern,n) (args, body) =
206 depattern (pattern,n) (args, body) =
207 case pattern of
207 case pattern of