From 23c350c4b1834b0fc75711c304da4ac4da15c075 Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Fri, 10 Jul 2015 18:30:34 +0100 Subject: [PATCH] Fix/ignore hlint warnings --- Test/DejaFu/Deterministic.hs | 4 +++- Test/DejaFu/Deterministic/IO.hs | 4 +++- Test/DejaFu/Deterministic/Internal.hs | 2 ++ Test/DejaFu/SCT.hs | 2 ++ Test/DejaFu/STM.hs | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Test/DejaFu/Deterministic.hs b/Test/DejaFu/Deterministic.hs index 0e56493..693c72f 100755 --- a/Test/DejaFu/Deterministic.hs +++ b/Test/DejaFu/Deterministic.hs @@ -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 diff --git a/Test/DejaFu/Deterministic/IO.hs b/Test/DejaFu/Deterministic/IO.hs index 1ea7a74..4aa2525 100644 --- a/Test/DejaFu/Deterministic/IO.hs +++ b/Test/DejaFu/Deterministic/IO.hs @@ -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 diff --git a/Test/DejaFu/Deterministic/Internal.hs b/Test/DejaFu/Deterministic/Internal.hs index abf4cfe..2807e12 100755 --- a/Test/DejaFu/Deterministic/Internal.hs +++ b/Test/DejaFu/Deterministic/Internal.hs @@ -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 diff --git a/Test/DejaFu/SCT.hs b/Test/DejaFu/SCT.hs index a89aac6..5ee4c8b 100644 --- a/Test/DejaFu/SCT.hs +++ b/Test/DejaFu/SCT.hs @@ -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 diff --git a/Test/DejaFu/STM.hs b/Test/DejaFu/STM.hs index f14bc4f..fea9f2d 100755 --- a/Test/DejaFu/STM.hs +++ b/Test/DejaFu/STM.hs @@ -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