mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-12-18 19:11:37 +03:00
Fix/ignore hlint warnings
This commit is contained in:
parent
1c8720a635
commit
23c350c4b1
@ -79,13 +79,15 @@ import Test.DejaFu.STM.Internal (CTVar(..))
|
||||
import qualified Control.Monad.Catch as Ca
|
||||
import qualified Control.Monad.Conc.Class as C
|
||||
|
||||
{-# ANN module ("HLint: ignore Avoid lambda" :: String) #-}
|
||||
|
||||
-- | The @Conc@ monad itself. This uses the same
|
||||
-- universally-quantified indexing state trick as used by 'ST' and
|
||||
-- 'STRef's to prevent mutable references from leaking out of the
|
||||
-- monad.
|
||||
newtype Conc t a = C { unC :: M (ST t) (STRef t) (STMLike t) a } deriving (Functor, Applicative, Monad)
|
||||
|
||||
wrap :: (M (ST t) (STRef t) (STMLike t) a -> M (ST t) (STRef t) (STMLike t) a) -> (Conc t a -> Conc t a)
|
||||
wrap :: (M (ST t) (STRef t) (STMLike t) a -> M (ST t) (STRef t) (STMLike t) a) -> Conc t a -> Conc t a
|
||||
wrap f = C . f . unC
|
||||
|
||||
instance Ca.MonadCatch (Conc t) where
|
||||
|
@ -82,10 +82,12 @@ import qualified Control.Monad.Catch as Ca
|
||||
import qualified Control.Monad.Conc.Class as C
|
||||
import qualified Control.Monad.IO.Class as IO
|
||||
|
||||
{-# ANN module ("HLint: ignore Avoid lambda" :: String) #-}
|
||||
|
||||
-- | The 'IO' variant of Test.DejaFu.Deterministic's @Conc@ monad.
|
||||
newtype ConcIO t a = C { unC :: M IO IORef (STMLike t) a } deriving (Functor, Applicative, Monad)
|
||||
|
||||
wrap :: (M IO IORef (STMLike t) a -> M IO IORef (STMLike t) a) -> (ConcIO t a -> ConcIO t a)
|
||||
wrap :: (M IO IORef (STMLike t) a -> M IO IORef (STMLike t) a) -> ConcIO t a -> ConcIO t a
|
||||
wrap f = C . f . unC
|
||||
|
||||
instance Ca.MonadCatch (ConcIO t) where
|
||||
|
@ -48,6 +48,8 @@ import Test.DejaFu.Deterministic.Internal.Threading
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
||||
{-# ANN module ("HLint: ignore Use record patterns" :: String) #-}
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- * Execution
|
||||
|
||||
|
@ -34,6 +34,8 @@ import Data.Traversable (Traversable(traverse), fmapDefault, foldMapDefault)
|
||||
import Test.DejaFu.Deterministic
|
||||
import Test.DejaFu.Deterministic.IO (ConcIO, runConcIO)
|
||||
|
||||
{-# ANN module ("HLint: ignore Use record patterns" :: String) #-}
|
||||
|
||||
-- * Result trees
|
||||
|
||||
-- | Results are presented in a lazy tree, where each node contains a
|
||||
|
@ -40,6 +40,8 @@ import Test.DejaFu.STM.Internal
|
||||
|
||||
import qualified Control.Monad.STM.Class as C
|
||||
|
||||
{-# ANN module ("HLint: ignore Use record patterns" :: String) #-}
|
||||
|
||||
-- | The 'MonadSTM' implementation, it encapsulates a single atomic
|
||||
-- transaction. The environment, that is, the collection of defined
|
||||
-- 'CTVar's is implicit, there is no list of them, they exist purely
|
||||
|
Loading…
Reference in New Issue
Block a user