Permalink
Browse files

Fix optimization error.

  • Loading branch information...
1 parent 29cd135 commit 07ff34754a179b9f21f61e6add464bca6e787321 evancz committed Aug 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 elm/src/Gen/CompileToJS.hs
@@ -131,7 +131,7 @@ toJS expr =
Binop op e1 e2 -> binop op (toJS e1) (toJS e2)
If eb et ef -> parens $ iff (toJS eb) (toJS et) (toJS ef)
Lambda v e -> jsFunc v $ ret (toJS e)
- App (Var "toText") (Str s) -> show s
+ App (Var "toText") (Str s) -> "toText" ++ parens (show s)
App (Var "link") (Str s) -> "link(" ++ show s ++ ")"
App (Var "plainText") (Str s) -> "plainText(" ++ show s ++ ")"
App e1 e2 -> toJS e1 ++ parens (toJS e2)

0 comments on commit 07ff347

Please sign in to comment.