From 2684d29ca5b0ceaeb22eb074c10b23f260a49501 Mon Sep 17 00:00:00 2001 From: DanielRrr Date: Fri, 23 Feb 2018 15:48:51 +0300 Subject: [PATCH] deleted ../Util/Base.hs and monad-control #34 --- serokell-util.cabal | 2 -- src/Serokell/Util/Base.hs | 18 ------------------ 2 files changed, 20 deletions(-) delete mode 100644 src/Serokell/Util/Base.hs diff --git a/serokell-util.cabal b/serokell-util.cabal index b70fe12..8636b38 100644 --- a/serokell-util.cabal +++ b/serokell-util.cabal @@ -26,7 +26,6 @@ library Serokell.Util Serokell.Util.ANSI - Serokell.Util.Base Serokell.Util.Base16 Serokell.Util.Base64 Serokell.Util.Bench @@ -68,7 +67,6 @@ library , hashable >= 1.2.4.0 , lens , log-warper ^>= 1.8.5 - , monad-control , mtl , optparse-applicative , parsec diff --git a/src/Serokell/Util/Base.hs b/src/Serokell/Util/Base.hs deleted file mode 100644 index 4527145..0000000 --- a/src/Serokell/Util/Base.hs +++ /dev/null @@ -1,18 +0,0 @@ --- | Util for MonadBaseControl - -{-# LANGUAGE FlexibleContexts #-} - -module Serokell.Util.Base - ( inCurrentContext - ) where - -import Universum - -import Control.Monad (void) -import Control.Monad.Trans.Control (MonadBaseControl (..)) - --- | Remembers monadic context of an action and transforms it to `IO`. --- Note that any changes in context would be lost. -inCurrentContext :: (MonadBaseControl IO m, MonadIO n) => m () -> m (n ()) -inCurrentContext action = - liftBaseWith $ \runInIO -> return . liftIO . void $ runInIO action