Pointify the newScope function
commit756407e57c28ae406878dbc00b2e5df6f8aa27a2
authorPhil Freeman <paf31@cantab.net>
dateSun 3 Aug 2014, 12:04 (12 years ago)
parent6e760dc
src/Language/PureScript/Renamer.hs+5−1
@@ -39,7 +39,11 @@ runRename scope = flip evalState (M.fromList $ zip scope scope)
3939-- when leaving an Abs.
4040--
4141newScope :: 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
4347
4448-- |
4549-- Adds a new scope entry for an ident. If the ident is already present, a new