Removed the dependency on Control.Monad.State.Class package, since that isn't in the older Debian versions
This commit is contained in:
parent
7fe77146d0
commit
d82a80639d
|
@ -21,7 +21,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
module Utils where
|
module Utils where
|
||||||
|
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import Control.Monad.State.Class
|
|
||||||
import Data.Ord
|
import Data.Ord
|
||||||
import System.IO
|
import System.IO
|
||||||
import System.IO.Error
|
import System.IO.Error
|
||||||
|
@ -142,7 +141,7 @@ powerset :: [a] -> [[a]]
|
||||||
powerset = filterM (const [True, False])
|
powerset = filterM (const [True, False])
|
||||||
|
|
||||||
-- | Alters a monadic state and returns the old value (from before the alteration).
|
-- | Alters a monadic state and returns the old value (from before the alteration).
|
||||||
modify' :: MonadState s m => (s -> s) -> m s
|
modify' :: Monad m => (s -> s) -> StateT s m s
|
||||||
modify' f = do x <- get
|
modify' f = do x <- get
|
||||||
put (f x)
|
put (f x)
|
||||||
return x
|
return x
|
||||||
|
|
Loading…
Reference in New Issue
Block a user