Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix optimization error.

  • Loading branch information...
commit 07ff34754a179b9f21f61e6add464bca6e787321 1 parent 29cd135
@evancz evancz authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  elm/src/Gen/CompileToJS.hs
View
2  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.
Something went wrong with that request. Please try again.