Allow for variable names with single quotes in them.
commit6075cc8358a9910591743cb7331ee3a8ce2910ef
authorevancz <info@elm-lang.org>
dateSun 10 Jun 2012, 00:09 (14 years ago)
parent375003e
elm/src/Rename.hs+1−1
@@ -68,7 +68,7 @@ rename' env expr =
6868extend :: (String -> String) -> String -> GuidCounter (String, String -> String)
6969extend env x = do
7070 n <- guid
71− let rx = x ++ "_" ++ show n
71+ let rx = map (\c -> if c == '\'' then '_' else c) $ x ++ "_" ++ show n
7272 return (rx, \y -> if y == x then rx else env y)
7373
7474patternExtend :: Pattern -> (String -> String) -> GuidCounter (Pattern, String -> String)