Skip to content

Commit 6ae0168

Browse files
committed
Stop doing special things for (<<) and (>>)
Fixes #1722
1 parent acecae2 commit 6ae0168

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

compiler/src/Generate/JavaScript/Expression.hs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ generateBasicsCall mode home name args =
500500

501501
[elmLeft, elmRight] ->
502502
case name of
503-
"composeL" -> decomposeL mode elmLeft [elmRight]
504-
"composeR" -> decomposeR mode [elmLeft] elmRight
503+
-- NOTE: removed "composeL" and "composeR" because of this issue:
504+
-- https://github.com/elm/compiler/issues/1722
505505
"append" -> append mode elmLeft elmRight
506506
"apL" -> generateJsExpr mode $ apply elmLeft elmRight
507507
"apR" -> generateJsExpr mode $ apply elmRight elmLeft
@@ -578,30 +578,6 @@ isLiteral expr =
578578
False
579579

580580

581-
decomposeL :: Mode.Mode -> Opt.Expr -> [Opt.Expr] -> JS.Expr
582-
decomposeL mode expr funcs =
583-
case expr of
584-
Opt.Call (Opt.VarGlobal (Opt.Global home "composeL")) [left, func]
585-
| home == ModuleName.basics ->
586-
decomposeL mode left (func:funcs)
587-
588-
_ ->
589-
generateJsExpr mode $
590-
Opt.Function [N.dollar] (foldr apply (Opt.VarLocal N.dollar) (expr:funcs))
591-
592-
593-
decomposeR :: Mode.Mode -> [Opt.Expr] -> Opt.Expr -> JS.Expr
594-
decomposeR mode funcs expr =
595-
case expr of
596-
Opt.Call (Opt.VarGlobal (Opt.Global home "composeR")) [func, right]
597-
| home == ModuleName.basics ->
598-
decomposeR mode (func:funcs) right
599-
600-
_ ->
601-
generateJsExpr mode $
602-
Opt.Function [N.dollar] (foldr apply (Opt.VarLocal N.dollar) (expr:funcs))
603-
604-
605581
apply :: Opt.Expr -> Opt.Expr -> Opt.Expr
606582
apply func value =
607583
case func of

0 commit comments

Comments
 (0)