diff --git a/examples/CLI.hs b/examples/CLI.hs index 35d1d7c..d7b0527 100644 --- a/examples/CLI.hs +++ b/examples/CLI.hs @@ -6,8 +6,8 @@ module CLI where import Control.Monad (unless) -import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.Freer +import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.State (MonadState (get, put), StateT (runStateT), lift) import Data.Typeable (Typeable, typeRep) import Text.Read (readMaybe) diff --git a/examples/Distribution/TestSuite/QuickCheck.hs b/examples/Distribution/TestSuite/QuickCheck.hs index ee30626..1d36d01 100644 --- a/examples/Distribution/TestSuite/QuickCheck.hs +++ b/examples/Distribution/TestSuite/QuickCheck.hs @@ -116,8 +116,8 @@ where import Data.Bool (bool) import Data.Functor ((<&>)) -import qualified Distribution.TestSuite as T -import qualified Test.QuickCheck as QC +import Distribution.TestSuite qualified as T +import Test.QuickCheck qualified as QC import Test.QuickCheck.Random (QCGen) import Text.Read (readMaybe) @@ -353,7 +353,7 @@ getOptionDescrs TestArgs {..} = } ] -getModifiers :: QC.Testable a => TestArgs -> a -> QC.Property +getModifiers :: (QC.Testable a) => TestArgs -> a -> QC.Property getModifiers TestArgs {verbosity, noShrinking, verboseShrinking, sizeScale} = foldr (.) QC.property $ snd @@ -375,12 +375,12 @@ data PropertyTest prop = PropertyTest property :: prop } -qcTestArgs :: QC.Testable a => TestArgs -> a -> IO QC.Result +qcTestArgs :: (QC.Testable a) => TestArgs -> a -> IO QC.Result qcTestArgs args property = QC.quickCheckWithResult (testArgsToArgs args) (getModifiers args property) -- | Get a Cabal 'T.Test' with custom 'TestArgs' from a 'PropertyTest' that takes the test arguments and returns a 'QC.testable' value getPropertyTestWithUsing :: - QC.Testable prop => + (QC.Testable prop) => -- | The arguments for the test TestArgs -> -- | A property test whose 'property' takes a 'TestArgs' argument @@ -411,7 +411,7 @@ getPropertyTestWithUsing originalArgs PropertyTest {..} = -- | Get a Cabal 'T.Test' from a 'PropertyTest' that takes the test arguments and returns a 'QC.Testable' value getPropertyTestUsing :: - QC.Testable prop => + (QC.Testable prop) => -- | A property test whose 'property' takes a 'TestArgs' argument PropertyTest (TestArgs -> prop) -> T.Test @@ -422,7 +422,7 @@ discardingTestArgs test@PropertyTest {property} = test {property = const propert -- | Get a Cabal 'T.Test' from a 'PropertyTest' with custom 'TestArgs' getPropertyTestWith :: - QC.Testable prop => + (QC.Testable prop) => -- | The arguments for the test TestArgs -> PropertyTest prop -> @@ -430,13 +430,13 @@ getPropertyTestWith :: getPropertyTestWith args = getPropertyTestWithUsing args . discardingTestArgs -- | Get a Cabal 'T.Test' from a 'PropertyTest' -getPropertyTest :: QC.Testable prop => PropertyTest prop -> T.Test +getPropertyTest :: (QC.Testable prop) => PropertyTest prop -> T.Test getPropertyTest = getPropertyTestWithUsing stdTestArgs . discardingTestArgs -- | Get a list of 'T.Test's from a list of 'PropertyTest's -getPropertyTests :: QC.Testable prop => [PropertyTest prop] -> [T.Test] +getPropertyTests :: (QC.Testable prop) => [PropertyTest prop] -> [T.Test] getPropertyTests = (getPropertyTest <$>) -- | Get a named test group from a list of 'PropertyTest's. These are assumed to be able to run in parallel. See 'T.testGroup' and 'T.Group'. -propertyTestGroup :: QC.Testable prop => String -> [PropertyTest prop] -> T.Test +propertyTestGroup :: (QC.Testable prop) => String -> [PropertyTest prop] -> T.Test propertyTestGroup name = T.testGroup name . getPropertyTests diff --git a/examples/Lottery.hs b/examples/Lottery.hs index 264d452..c3bafa8 100644 --- a/examples/Lottery.hs +++ b/examples/Lottery.hs @@ -11,7 +11,7 @@ import Choreography import Choreography.Network.Http import Control.Exception (Exception, throwIO) import Control.Monad (unless) -import Control.Monad.IO.Class (MonadIO(liftIO)) +import Control.Monad.IO.Class (MonadIO (liftIO)) import Crypto.Hash (Digest) import Crypto.Hash qualified as Crypto import Data (TestArgs, reference) diff --git a/examples/ObliviousTransfer.hs b/examples/ObliviousTransfer.hs index 7c0f32c..c6e29d0 100644 --- a/examples/ObliviousTransfer.hs +++ b/examples/ObliviousTransfer.hs @@ -9,7 +9,7 @@ module ObliviousTransfer (ot2, ot4, main) where import CLI import Choreography import Choreography.Network.Http -import Control.Monad.IO.Class (MonadIO(liftIO)) +import Control.Monad.IO.Class (MonadIO (liftIO)) -- For cryptonite import Crypto.Hash.Algorithms qualified as HASH