math-programming-tests-0.4.0: Utility functions for testing implementations of the math-programming library.

Safe HaskellNone
LanguageHaskell2010

Math.Programming.Tests.Api

Synopsis

Documentation

makeApiTests Source #

Arguments

:: (Num (Numeric m), MonadIO m, LPMonad m) 
=> (m () -> IO ())

The runner for the API being tested.

-> TestTree

The resulting test suite.

setGetVariableName :: (MonadIO m, LPMonad m) => m () Source #

We should be able to set and retrieve variable names

setGetConstraintName :: (Num (Numeric m), MonadIO m, LPMonad m) => m () Source #

We should be able to set and retrieve constraint names

newtype LPActions m Source #

Constructors

LPActions (m ()) 
Instances
LPMonad m => Arbitrary (LPActions m) Source # 
Instance details

Defined in Math.Programming.Tests.Api

Methods

arbitrary :: Gen (LPActions m) #

shrink :: LPActions m -> [LPActions m] #

lpActions :: LPMonad m => Int -> Gen (m ()) Source #

bindOver Source #

Arguments

:: Monad m 
=> m a

The action providing the passed value

-> (a -> m b)

The function to bind to

-> m ()

The intermediate actions

-> m b

The resulting value

Execute the monadic bind (>>=), with some other actions taken in between.