on master help sign in
Clean up Transform/Replace.hs. Switch the environment from a (String -> String) to a (Map String String).
commit98eceb5496381531e9006ff6e66caa53a3ea3bb7 authorEvan Czaplicki <evan@Evans-MacBook-Air.local> dateSun 23 Jun 2013, 01:33 (13 years ago) parentcd83c4c
1 file changed+3−2
compiler/Transform/Replace.hs+3−2
compiler/Transform/Replace.hs+3−2
@@ -33,9 +33,10 @@ patternVars :: Pattern -> Set String
3333patternVars pattern =
3434 case pattern of
3535 PData _ ps -> unions (map patternVars ps)
36− PVar x -> singleton x
36+ PVar x -> singleton x
3737 PAsVar x p -> insert x (patternVars p)
38− PAnything -> empty
38+ PAnything -> empty
39+ PLiteral _ -> empty
3940
4041depth :: Expr -> Integer
4142depth = depth' 0