Permalink
Browse files

+ Alpha conversion extended for purpose if inlining

  • Loading branch information...
Averethel committed Feb 19, 2013
1 parent ddd5fca commit ac495799ce85801005db7f2e8c06bbb0d251d24c
Showing with 5 additions and 2 deletions.
  1. +5 −2 AlphaConvert.hs
View
@@ -1,4 +1,4 @@
-module AlphaConvert (alphaConvert) where
+module AlphaConvert (alphaConvert, alphaConvertWithEnv) where
import qualified AlphaConvert.AlphaConvert as AC
import AlphaConvert.Counter
import AlphaConvert.Env
@@ -7,4 +7,7 @@ module AlphaConvert (alphaConvert) where
import Control.Monad.State
alphaConvert :: KExpr -> KExpr
- alphaConvert e = fst $ runState (AC.alphaConvert emptyEnv e) emptyState
+ alphaConvert = alphaConvertWithEnv emptyEnv
+
+ alphaConvertWithEnv :: Env -> KExpr -> KExpr
+ alphaConvertWithEnv env e = fst $ runState (AC.alphaConvert env e) emptyState

0 comments on commit ac49579

Please sign in to comment.