| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Target
- target :: Testable f => f -> Name -> FilePath -> IO ()
- targetResult :: Testable f => f -> Name -> FilePath -> IO Result
- targetWith :: Testable f => f -> Name -> FilePath -> TargetOpts -> IO ()
- targetResultWith :: Testable f => f -> Name -> FilePath -> TargetOpts -> IO Result
- targetResultWithStr :: Testable f => f -> String -> FilePath -> TargetOpts -> IO Result
- data Result
- class (AllHave Targetable (Args f), Targetable (Res f), AllHave Show (Args f)) => Testable f
- data TargetOpts = TargetOpts {}
- defaultOpts :: TargetOpts
- data Test = forall t . Testable t => T t
Documentation
Arguments
| :: Testable f | |
| => f | the function |
| -> Name | the name of the function |
| -> FilePath | the path to the module that defines the function |
| -> IO () |
Test whether a function inhabits its refinement type by enumerating valid inputs and calling the function.
targetWith :: Testable f => f -> Name -> FilePath -> TargetOpts -> IO () Source
Like target, but accepts options to control the enumeration depth,
solver, and verbosity.
targetResultWith :: Testable f => f -> Name -> FilePath -> TargetOpts -> IO Result Source
Like targetWith, but returns the Result instead of printing to standard out.
targetResultWithStr :: Testable f => f -> String -> FilePath -> TargetOpts -> IO Result Source
class (AllHave Targetable (Args f), Targetable (Res f), AllHave Show (Args f)) => Testable f Source
A class of functions that Target can test. A function is Testable iff
all of its component types are Targetable and all of its argument types are
Showable.
You should never have to define a new Testable instance.
Minimal complete definition
queryArgs, decodeArgs, apply, mkExprs
Instances
| (Targetable a, (~) [*] (Args a) ([] *), (~) * (Res a) a) => Testable a | |
| (Show a, Targetable a, Testable b) => Testable (a -> b) |
data TargetOpts Source
Constructors
| TargetOpts | |
Fields
| |
Instances