Fix a bug with TCO for multiple argument functions, fix #461
commiteadf23545c94fde2dbde9600b39dad102def6e22
authorPhil Freeman <paf31@cantab.net>
dateSun 6 Jul 2014, 14:14 (12 years ago)
parent4653122
src/Language/PureScript/Optimizer/TCO.hs+1−1
@@ -41,7 +41,7 @@ tco' = everywhereOnJS convert
4141 in case () of
4242 _ | isTailCall name body' ->
4343 let
44− allArgs = reverse $ concat argss
44+ allArgs = concat $ reverse argss
4545 in
4646 JSVariableIntroduction name (Just (replace (toLoop name allArgs body')))
4747 | otherwise -> js