Fix/ignore hlint warnings

This commit is contained in:
Michael Walker 2015-07-10 18:30:34 +01:00
parent 1c8720a635
commit 23c350c4b1
5 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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