Module Tools.Quick

Looks up quick check predicates in the given modules and tests them.

Usage:
java -cp fregec.jar frege.tools.Quick [ option ... ] modulespec ...

Options:

Ways to specify modules:

The number of passed/failed tests is reported. If any test failed or other errors occurred, the exit code will be non zero.

The code will try to heat up your CPU by running tests on all available cores. This should be faster on multi-core computers than running the tests sequentially. It makes it feasible to run more tests per predicate.

Imports

Table of Content

Definitions

propNameQName

functionality relies on the absolute name of type Gen

genNameQName
data Options

Constructors

Opt {list ∷ Bool, verbose ∷ Bool, excluded ∷ Bool, detailed ∷ Bool, ntimes ∷ Int, props ∷ [String], global ∷ Global}

Member Functions

detailedOptionsBool

access field detailed

excludedOptionsBool

access field excluded

globalOptionsGlobal

access field global

listOptionsBool

access field list

ntimesOptionsInt

access field ntimes

propsOptions → [String]

access field props

verboseOptionsBool

access field verbose

defaultOptionsOptions
data Counter

Constructors

Counter {passed ∷ Int, failed ∷ Int, aborted ∷ Bool}

Member Functions

abortedCounterBool

access field aborted

failedCounterInt

access field failed

passedCounterInt

access field passed

counterMconcatProperty
testFailedCounter
testPassedCounter
testAbortedCounter
unAbortedCounterCounter
main[String]IO Bool
myTargetStIO ()

find the target this module was compiled for

getOptOptions[String]IO (Options, [String])
checkThingOptionsStringIO Counter
checkModuleOptionsStringIO Counter
getPropsStringStIO [String]

import a package and extract all toplevel properties

checkPropsOptionsString → [String] → IO Counter
toGenObjectIO Property
native Quick.toGenImpl

This does the magic.

We know that the type of the item is Gen Prop on the Frege level. This will be compiled to something that is a TGen in Java terms.

Hence the cast is a no-op, and the native interface will believe our claim that the Lambda is a Property and will allow us to use it just like any other Property.

checkFieldOptionsStringClass a → StringIO Counter

Instances

instance Eq Counter

Member Functions

!=CounterCounterBool
infix  7

inherited from Eq.!=

==CounterCounterBool
infix  7

Function generated for derived instance.

hashCodeCounterInt

Function generated for derived instance.

instance Monoid Counter

Member Functions

mappendCounterCounterCounter
infixr  13
mconcat[Counter]Counter

inherited from Monoid.mconcat

memptyCounter
mtimesIntCounterCounter

inherited from Monoid.mtimes

sconcat[Counter]Counter

inherited from Semigroup.sconcat

stimesIntCounterCounter

inherited from Semigroup.stimes

Functions and Values by Type

StringStIO [String]

getProps

[String] → IO Bool

main

[Counter] → Counter

Monoid_Counter.sconcat, Monoid_Counter.mconcat

BoolBoolBoolBoolInt → [String] → GlobalOptions

Options.Opt

IntIntBoolCounter

Counter.Counter

IntCounterCounter

Monoid_Counter.stimes, Monoid_Counter.mtimes

ObjectIO Property

toGen

Counter → (BoolBool) → Counter

Counter.chg$aborted

Counter → (IntInt) → Counter

Counter.chg$passed, Counter.chg$failed

CounterBoolCounter

Counter.upd$aborted

CounterIntCounter

Counter.upd$passed, Counter.upd$failed

CounterCounterBool

Eq_Counter.!=, Eq_Counter.==

CounterCounterCounter

Monoid_Counter.mappend

CounterBool

Counter.aborted

CounterInt

Eq_Counter.hashCode, Counter.passed, Counter.failed

CounterCounter

unAborted

Options → ([String]→[String]) → Options

Options.chg$props

Options → (GlobalGlobal) → Options

Options.chg$global

Options → (BoolBool) → Options

Options.chg$verbose, Options.chg$detailed, Options.chg$excluded, Options.chg$list

Options → (IntInt) → Options

Options.chg$ntimes

OptionsString → [String] → IO Counter

checkProps

OptionsStringIO Counter

checkModule, checkThing

Options → [String] → IO (Options, [String])

getOpt

Options → [String] → Options

Options.upd$props

OptionsGlobalOptions

Options.upd$global

OptionsBoolOptions

Options.upd$verbose, Options.upd$list, Options.upd$detailed, Options.upd$excluded

OptionsIntOptions

Options.upd$ntimes

Options → [String]

Options.props

OptionsGlobal

Options.global

OptionsBool

Options.verbose, Options.list, Options.detailed, Options.excluded

OptionsInt

Options.ntimes

StIO ()

myTarget

Property

counterMconcat

QName

genName, propName

Counter

testAborted, testFailed, testPassed, Monoid_Counter.mempty

Options

defaultOptions

OptionsStringClass a → StringIO Counter

checkField

𝖆 → Bool

Counter.has$aborted, Counter.has$failed, Counter.has$passed, Options.has$props, Options.has$list, Options.has$ntimes, Options.has$detailed, Options.has$excluded, Options.has$global, Options.has$verbose

Valid HTML 4.01 Strict