X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FState.hs;h=0b6a2855627d76b7fb089d6586eeeb9e3660f8e3;hp=f28a8efc51f1b59d806c82001cf2a26791cea3d0;hb=e2e0785eb7f4efd9f7791d913cdfdfd03148cd86;hpb=452cba444c2f7cba3a9007f449fea3119c9074a9 diff --git a/compiler/utils/State.hs b/compiler/utils/State.hs index f28a8ef..0b6a285 100644 --- a/compiler/utils/State.hs +++ b/compiler/utils/State.hs @@ -1,5 +1,5 @@ -module State where +module State (module State, mapAccumLM {- XXX hack -}) where import MonadUtils @@ -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') -