projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc845b7
)
Remove generic monad function from State, it was moved to MonadUtils
author
Twan van Laarhoven
<twanvl@gmail.com>
Thu, 17 Jan 2008 20:21:44 +0000
(20:21 +0000)
committer
Twan van Laarhoven
<twanvl@gmail.com>
Thu, 17 Jan 2008 20:21:44 +0000
(20:21 +0000)
compiler/utils/State.hs
patch
|
blob
|
history
diff --git
a/compiler/utils/State.hs
b/compiler/utils/State.hs
index
f28a8ef
..
b8fcaa1
100644
(file)
--- a/
compiler/utils/State.hs
+++ b/
compiler/utils/State.hs
@@
-46,18
+46,3
@@
execState s i = case runState' s i of
runState :: State s a -> s -> (a, s)
runState s i = case runState' s i of
(# a, s' #) -> (a, s')
-
-
-mapAccumLM
- :: Monad m
- => (acc -> x -> m (acc, y)) -- ^ combining funcction
- -> acc -- ^ initial state
- -> [x] -- ^ inputs
- -> m (acc, [y]) -- ^ final state, outputs
-
-mapAccumLM _ s [] = return (s, [])
-mapAccumLM f s (x:xs)
- = do (s1, x') <- f s x
- (s2, xs') <- mapAccumLM f s1 xs
- return (s2, x' : xs')
-