on master help sign in
Fix JS generation for infix ops with dots
commitd94e218fd1039bed1bde555c448b05843f76721f authorEvan Czaplicki <info@elm-lang.org> dateSun 15 Sep 2013, 18:53 (13 years ago) parentc2eecc2
1 file changed+2−1
compiler/Generate/JavaScript.hs+2−1
compiler/Generate/JavaScript.hs+2−1
@@ -28,7 +28,8 @@ split = go []
2828 where
2929 go vars str =
3030 case break (=='.') str of
31− (x,'.':rest) -> go (vars ++ [x]) rest
31+ (x,'.':rest) | isOp x -> vars ++ [x ++ '.' : rest]
32+ | otherwise -> go (vars ++ [x]) rest
3233 (x,[]) -> vars ++ [x]
3334
3435var name = Id () (makeSafe name)