Skip to content

Commit c16c3aa

Browse files
authored
Merge pull request #640 from IntersectMBO/jdral/iolike
Make `IOLike` a type synonym instead of a class
2 parents c0b57ff + 4338129 commit c16c3aa

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src/Database/LSMTree/Common.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ import System.FS.IO (HandleIO)
7777
-------------------------------------------------------------------------------}
7878

7979
-- | Utility class for grouping @io-classes@ constraints.
80-
class ( MonadAsync m, MonadMVar m, MonadThrow (STM m), MonadThrow m
81-
, MonadCatch m , MonadMask m, PrimMonad m, MonadST m
82-
) => IOLike m
83-
84-
instance IOLike IO
80+
type IOLike m = (
81+
MonadAsync m, MonadMVar m, MonadThrow (STM m), MonadThrow m
82+
, MonadCatch m , MonadMask m, PrimMonad m, MonadST m
83+
)
8584

8685
{-------------------------------------------------------------------------------
8786
Sessions

test/Test/Util/Orphans.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Control.Monad ((<=<))
2020
import Control.Monad.IOSim (IOSim)
2121
import Data.Kind (Type)
2222
import Database.LSMTree (Cursor, LookupResult, QueryResult, Table)
23-
import Database.LSMTree.Common (BlobRef, IOLike, SerialiseValue)
23+
import Database.LSMTree.Common (BlobRef, SerialiseValue)
2424
import Database.LSMTree.Internal.Serialise (SerialiseKey)
2525
import Test.QuickCheck.Modifiers (Small (..))
2626
import Test.QuickCheck.StateModel (Realized)
@@ -34,8 +34,6 @@ import Test.Util.TypeFamilyWrappers (WrapBlob (..), WrapBlobRef (..),
3434
IOSim
3535
-------------------------------------------------------------------------------}
3636

37-
instance IOLike (IOSim s)
38-
3937
type instance Realized (IOSim s) a = RealizeIOSim s a
4038

4139
type RealizeIOSim :: Type -> Type -> Type

0 commit comments

Comments
 (0)