git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Pointify the newScope function
756407ePhil Freeman
src/Language/PureScript/Renamer.hs+5−1
@@ -39,7 +39,11 @@ runRename scope = flip evalState (M.fromList $ zip scope scope)
39-- when leaving an Abs.
39-- when leaving an Abs.
40--
40--
41newScope :: Rename a -> Rename a
41newScope :: Rename a -> Rename a
42−newScope x = get >>= lift . evalStateT x
42+newScope x = do
43+ scope <- get
44+ a <- x
45+ put scope
46+ return a
43
47
44-- |
48-- |
45-- Adds a new scope entry for an ident. If the ident is already present, a new
49-- Adds a new scope entry for an ident. If the ident is already present, a new