P      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>Safe bPluralizes a word. Is not comprehensive (and may never be), add missing cases as they are found. Kpluralize "test case" == "test cases" pluralize "property" == "properties".Appends two Strings side by side, line by line =beside ["asdf\nqw\n","zxvc\nas"] == "asdfzxvc\n\ \qw as\n"JAppend two Strings on top of each other, adding line breaks *when needed*.vShow elements of a list as a tuple. If there are multiple lines in any of the strings, tuple is printed multiline. bshowTuple ["asdf\nqwer\n","zxvc\nasdf\n"] == "( asdf\n\ \ qwer\n\ \, zxvc\n\ \ asdf )\n" *showTuple ["asdf","qwer"] == "(asdf,qwer)"(Formats a table using a given separator. table " " [ ["asdf", "qwer", "zxvc\nzxvc"] , ["0", "1", "2"] , ["123", "456\n789", "3"] ] == "asdf qwer zxvc\n\ \ zxvc\n\ \0 1 2\n\ \123 456 3\n\ \ 789\n\",Given a separator, format strings in columns ]columns " | " ["asdf", "qw\nzxcv", "as\ndf"] == "asdf | qw | as\n\ \ | zxcv | df\n";Fits a list to a certain width by appending a certain value fit ' ' 6 "str" == "str "  fit 0 6 [1,2,3] == [1,2,3,0,0,0]:normalize makes all list the same length by adding a value @normalize ["asdf","qw","er"] == normalize ["asdf","qw ","er "]0Given a list of lists returns the maximum length  (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None'Compose composed with compose operator. (f ... g) x y === f (g x y) bs5 returns all compositions formed by taking values of bs xs9 returns the list of sublists formed by taking values of xs<Check if all elements of a list is contained in another listU filter greater-later elements in a list according to a partial ordering relation. EfilterU (notContained) [[1],[2],[1,2,3],[3,4,5]] == [[1],[2],[3,4,5]]Takes values from a list while the values increase. If the original list is non-empty, the returning list will also be non-emptylastTimeout s xs will take the last value of xs it is able evaluate before s seconds elapse.(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None[(Show) Structure of a mutant. This format is intended for processing then pretty-printing.ATypes that can have their mutation shown. Has only one function  that returns a simple AST (:) representing the mutant. A standard implementation of  for  types is given by .$Show a Mutant as a tuple of lambdas. > putStrLn $ showMutantAsTuple ["p && q","not p"] ((&&),not) ((||),id) ( \p q -> case (p,q) of (False,False) -> True _ -> p && q , \p -> case p of False -> False True -> True _ -> not p )VCan be easily copy pasted into an interactive session for manipulation. On GHCi, use :{ and :}1 to allow multi-line expressions and definitions.SShow a Mutant as the list of bindings that differ from the original function(s). > putStrLn $ showMutantBindings ["p && q","not p"] ((&&),not) ((==),id) False && False = True not False = False not True = TrueRCan possibly be copied into the source of the original function for manipulation.gShow a Mutant as a new complete top-level definition, with a prime appended to the name of the mutant. > putStrLn $ showMutantDefinition ["p && q","not p"] ((&&),not) ((==),id) False &&- False = True p &&- q = p && q not' False = False not' True = True not' p = not p=Show a Mutant as a tuple of nested lambdas. Very similar to }, but the underlying data structure is not flatten: so the output is as close as possible to the underlying representation.>Show a Mutant without providing a default name. An alias for showMutantAsTuple [].)Default function names (when none given): f g h f' g' h' f'' g'' h''1Default names in a call (function and variables): )f x y z w x' y' z' w' x'' y'' z'' w'' ...For a given type Type instance of Eq and Show, define the  instance as: 5instance ShowMutable Type where mutantS = mutantSEq Check if a  is null Check if a  is a function.LShow a nameless mutant. Functions should not (but can) be shown using this.#Show top-level (maybe tuple) named  as a tuple.Given a list with the function and variable names and a list of bindings, show a function as a case expression enclosed in a lambda.nGiven a list with the function and variable names and a list of bindings, show function binding declarations.The newY boolean argument indicates whether if the function should be shown as a new definition.?Separate function from variable names in a simple Haskell expr. Sfvarnames "f x y" == ["f","x","y"] fvarnames "aa bb cc dd" == ["aa","bb","cc","dd"]`When there are three lexemes, the function checks for a potential infix operator in the middle. $fvarnames "x + y" == ["(+)","x","y"]%This function always returns a "head" fvarnames "" == ["f"]Apply a function (&) to a list of variables ('[String]').PFor the sake of clarity, in the following examples, double-quotes are omitted: > apply f == f > apply f x == f x > apply f x y == f x y > apply (+) == (+) > apply (+) x == (+) x > apply (+) x y == (+) x y > apply + == (+) > apply + x == (+) x > apply + x y == (x + y) > apply + x y z == (+) x y z'Check if a function / operator is infix aisInfix "foo" == False isInfix "(+)" == False isInfix "`foo`" == True isInfix "+" == True3Transform an infix operator into an infix function: 3toPrefix "`foo`" == "foo" toPrefix "+" == "(+)"xs +- ys superimposes xs over ys. 1,2,3%+- [0,0,0,0,0,0,0] == [1,2,3,0,0,0,0]x,y,zU+- [a,b,c,d,e,f,g] == [x,y,z,d,e,f,g] "asdf" +- "this is a test" == "asdf is a test"3   . (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None !" !"(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None#This typeclass is similar to . A type is # when there exists a function that is able to list mutations of a value. Ideally: list all possible values without repetitions.#Instances are usually defined by a $ function that given a value, returns tiers of mutants of that value: the first tier contains the equivalent mutant, of size 0, the second tier contains mutants of size 1, the third tier contains mutants of size 2, and so on.?The equivalent mutant is the actual function without mutations.The size of a mutant is given by the sum of: the number of mutated points (relations) and the sizes of mutated arguments and results.1To get only inequivalent mutants, just take the  of either % or $:  tail mutants  tail mutiersGiven that the underlying j enumeration has no repetitions, parametric instances defined in this file will have no repeated mutants.&Implementation of $` for non-functional data types. Use this to create instances for user-defined data types, e.g.: +instance MyData where mutiers = mutiersEqand for parametric datatypes: =instance (Eq a, Eq b) => MyDt a b where mutiers = mutiersEq Examples: mutiersEq True = [[True], [False]] mutiersEq 2 = [[2], [0], [1], [], [3], [4], [5], [6], [7], [8], [9], ...] mutiersEq [1] = [[[1]], [[]], [[0]], [[0,0]], [[0,0,0],[0,1],[1,0],[-1]], ...]TMutate a function at a single point. The following two declarations are equivalent: id' = id `mut` (0,1) id' 0 = 1 id' x = x$Mutate a function at several points. Ff `mutate` [(x,a),(y,b),(z,c)] = f `mut` (x,a) `mut` (y,b) `mut` (z,c)Return tiers of possible mutations for a single point of a function. If the function is undefined at that point, no mutations are provided. This function does not return the null mutant. E(+1) `mutationsFor` 1 = [ [(1,0)], [(1,1)], [], [(1,3)], [(1,4)], ...Returns tiers of mutants on a selection of arguments of a function. Will only return the null mutant from an empty selection of arguments.';For Mutable tuple instances greater than sixtuples, see FitSpec.Mutable.Tuplesc. Despite being hidden in this Haddock documentation, 7-tuples up to 12-tuples are exported by  Test.FitSpec.+ .mutants (0,1) = [(0,1),(0,0),(1,1),(0,-1),...], mutants not = [ not , \p -> case p of False -> False; _ -> not p , \p -> case p of True -> True; _ -> not p , \p -> case p of False -> False; True -> True ]3 (mutants (Just 0) = [Just 0, Nothing, ...4 (mutants [0] = [ [0], [], [0,0], [1], ...5 mutants True = [True,False]8 #mutants 3 = [3,0,1,2,4,5,6,7,8,...]9 mutants () = [()]#$%&'()*+,-./0123456789#$%&#$%&#$%&'()*+,-./0123456789(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None:;<=>?:;<=>?(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None@Derives #,  and (optionally)  instances for a given type .Consider the following Stack datatype: (data Stack a = Stack a (Stack a) | EmptyWriting deriveMutable ''Stack)will automatically derive the following , # and  instances: instance Listable a => Listable (Stack a) where tiers = cons2 Stack \/ cons0 Empty instance (Eq a, Listable a) => Mutable a where mutiers = mutiersEq instance (Eq a, Show a) => ShowMutable a where mutantS = mutantSEqIf a 4 instance already exists, it is not derived. (cf.: ) Needs the TemplateHaskell extension.B,Derives a Mutable instance for a given type 1 using a given context for all type variables.gGiven a type name, return the number of arguments taken by that type. Examples in partially broken TH: arity ''Int === Q 0 arity ''Int->Int === Q 0 arity ''Maybe === Q 1 arity ''Either === Q 2 arity ''Int-> === Q 1ZThis works for Data's and Newtype's and it is useful when generating typeclass instances.@ABCM     #$%&@ABC@BAC@ABC(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>NoneNgA line of result for a single equivalence class of properties with the exact same surviving mutants.P&property-sets in the equivalence classQ properties implied by this classRlist of surviving mutantsS!smallest surviving mutant, if anyTnumber of surviving mutantsUnumber of killed mutantsV,total number of mutants generated and testedW#percentage of killed mutants, 0-100X,Requested number of tests (same for all rs.)Ymutants were exhaustedZDAn encoded representation of a property suitable for use by FitSpec.Each list of strings is a printable representation of one possible choice of argument values for the property. Each boolean indicate whether the property holds for this choice.[Given a  type (as defined by Test.LeanCheck ), returns a Z.ZThis function should be used on every property to create a property list to be passed to report,  reportWith,  mainDefault or mainWith. 'property $ \x y -> x + y < y + (x::Int)c1Return minimality and completeness results. See report. Returns a description of property sets, grouping the ones that had the same surviving mutants. The resulting list is ordered starting with the least surviving mutants to the most surviving mutants. Arguments:is: list of property ids (length is == length (pmap x))pmap: a property mapms.: list of mutants to apply to the property map#Return a list of tuples containing:a list of property setsGa list of mutants paired with booleans indicating whether each survived!Returns a description of property sets, grouping the ones that had the same surviving mutants. The resulting list is ordered starting with the least surviving mutants to the most surviving mutants. Arguments:is: list of property ids (length is == length (pmap x))pmap: a property mapms.: list of mutants to apply to the property map#Return a list of tuples containing:a list of property sets9a boolean list indicating whether a given mutant survived"nSurv props fs[ returns the number of values that match compositions of properties on the property map.props should be a function from a value to a list of properties that match that value (in the case of functions, functions that "survive" those properties).fs* is a list of values to be mapped over by props 9length (nSurvivors props fs) == 2 ^ (length (props fs))RThis function is otherwise unused in this file. It is just a simpler version of pssurv to serve as documentation.It is also not exported!/DEFGHIJKLMNOPQRSTUVWXY#Z[$%\]^_`abcde&fg'( !"h)%DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh%[ZcdeNOPQRSTUVWXYM_`\]^fgbaDEFGHIJKLhDEFGHIJKLMN OPQRSTUVWXY#Z[$%\]^_`abcde&fg'( !"h)(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>Nonej$Extra arguments / configuration for | . See y for default values.l'(starting) number of function mutationsm1(starting) number of test values (for each prop.)ntimeout in seconds, 0 for just m * lonames of functions: ["foo x y","goo x y"]p whether to show detailed resultsqhow to show mutantsr#number of surviving mutants to shows'ignored argument (user defined meaning)t'How to show mutants. Use this to fill q.yDefault arguments for |:nMutants = 500, start with 500 mutants nTests = 1000, start with 1000 test values timeout = 5O, keep incresing the number of mutants until 5 seconds elapse names = []!, default function call template: &["f x y z", "g x y z", "h x y z", ...]zfNon timed-out default arguments. Make conjectures based on a fixed number of mutants and tests, e.g.: #reportWith (fixargs 100 200) f pmapThis is just a shorthand, see: Bfixargs nm nt = args { nMutants = nm, nTests = nt, timeout = 0 } G(fixargs nm nt) { nMutants = 500, nTests = 1000, timeout = 5 } = args{GReport results generated by FitSpec. Uses standard configuration (see yd). Needs a function to be mutated and a property map. Example (specification of boolean negation): properties not = [ property $ \p -> not (not p) == p , property $ \p -> not (not (not p)) == not p ] main = report not properties|Same as { but can be configured via j (y or z ), e.g.: /reportWith args { timeout = 10 } fun properties}Same as |q, but accepts a list of manually defined (extra) mutants to be tested alongside those automatically generated.*Same as }N, does not abort if the original function does not follow the property set.+%Show conjectures derived from resultsjklmnopqrstuvwxyz,{|}*-./0+12Zjksnolmpqrtuvwxyz{|}{|}jklmnopqrsyzZtuvwxj klmnopqrstuvwxyz,{|}*-./0+12(c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None/0Same as |F, but allow overriding of configuration via command line arguments.Same as {5, but allow configuration via command line arguments.3~Zjksnolmpqrtuvwxyz{|}~~3~ (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None4456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>None     #$%&@ABCZ[jksnolmpqrtuvwxyz{|}~456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg)Z[jklmnopqrstuvwxyz{|}~#$%&@BAC (c) 2015-2017 Rudy Matela$3-Clause BSD (see the file LICENSE) Rudy Matela <rudy@matela.com.br>NonehGiven a list of pairs of property groups and their implications, return implications between groups (transitive cases are ommitted).iGiven a list of relations, generate a graphviz graph containing those relations. Generate a dotfile from implications between groups.jEquivalent to c but returns a dotfilek4Equivalent to report, but writes a dotfile to a filel4Equivalent to report, but writes a dotfile to stdouthmnijklhmnijklhmnijklo !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRRSTUVWXYZ[[\]^_`abcdefghijklmnopqrstuvvwxyz{|}~          !"#$%&'(')'*'+','-'./0123456789:;<=>?@ABCDEFGHIJKJKJLJMJMJNJOJOJPJQJQJRJSJTJUJVJWJWJXJYJYJZJ[J[J\J]J]J^J_J_J`JaJaJbJcJcJdJeJeJfJgJgJhJiJiJjJkJkJlJmJmJn o p q r s t uv$fitspec-0.4.1-6sDMOpW3gke9WHyfoRlFb2Test.FitSpec.ShowMutableTest.FitSpec.ShowMutable.TuplesTest.FitSpec.MutableTest.FitSpec.Mutable.TuplesTest.FitSpec.DeriveTest.FitSpec.EngineTest.FitSpec.ReportTest.FitSpec.MainTest.FitSpec.TestTypesTest.FitSpec.PrettyPrintTest.FitSpec.Utils Test.FitSpecTest.FitSpec.DotMutantS ShowMutablemutantSshowMutantAsTupleshowMutantBindingsshowMutantDefinitionshowMutantNested mutantSEq mutantSTuple$fShowMutable(,,,,,)$fShowMutable(,,,,)$fShowMutable(,,,)$fShowMutable(,,)$fShowMutable(,)$fShowMutable(->)$fShowMutableWord$fShowMutableOrdering$fShowMutableDouble$fShowMutableFloat$fShowMutableRatio$fShowMutableEither$fShowMutableMaybe$fShowMutable[]$fShowMutableBool$fShowMutableChar$fShowMutableInteger$fShowMutableInt$fShowMutable() $fShowMutantS$fShowMutable(,,,,,,,,,,,)$fShowMutable(,,,,,,,,,,)$fShowMutable(,,,,,,,,,)$fShowMutable(,,,,,,,,)$fShowMutable(,,,,,,,)$fShowMutable(,,,,,,)Mutablemutiersmutants mutiersEq$fMutable(,,,,,)$fMutable(,,,,)$fMutable(,,,) $fMutable(,,) $fMutable(,) $fMutable(->) $fMutableWord$fMutableOrdering$fMutableDouble$fMutableFloat$fMutableRatio$fMutableEither$fMutableMaybe $fMutable[] $fMutableBool $fMutableChar$fMutableInteger $fMutableInt $fMutable()$fMutable(,,,,,,,,,,,)$fMutable(,,,,,,,,,,)$fMutable(,,,,,,,,,)$fMutable(,,,,,,,,)$fMutable(,,,,,,,)$fMutable(,,,,,,) deriveMutablederiveMutableCascadingderiveMutableEderiveMutableCascadingE ConjectureisEqisImcleftcrightcscorecnKilled cnSurvivorsResultsResultsetsimplied survivorssmallestSurvivor nSurvivorsnKilled totalMutantsscoremaxTestsmutantsExhaustedPropertypropertypropertiesToMappropertiesHold propertiesCEpropertiesNTestspropertiesTestsExhaustedfilterNonCanonreduceImplications getResultsgetResultsExtragetResultsExtraTimeoutminimalcomplete conjectures$fShowConjectureArgsnMutantsnTeststimeoutnamesverbose showMutantAsrowsextra ShowMutantAsTuple NestedTuple DefinitionBindingsargsfixargsreport reportWithreportWithExtra getArgsWithgetArgsmainWith defaultMain $fDataArgs$fDataShowMutantAs$fShowMutableWord4$fShowMutableWord3$fShowMutableWord2$fShowMutableWord1$fShowMutableInt4$fShowMutableInt3$fShowMutableInt2$fShowMutableInt1$fShowMutableNat$fMutableWord4$fMutableWord3$fMutableWord2$fMutableWord1 $fMutableInt4 $fMutableInt3 $fMutableInt2 $fMutableInt1 $fMutableNat pluralizebesideabove showTupletablecolumnsfit normalize maxLength showQuantityshowEachremoveTrailing headToUpper... compositionssubsets containedfilterUtakeWhileIncreasing lastTimeoutuncurry3countcontainssortOnsortAndGroupOnsortGroupAndCollapsesortAndGroupFstBySndtakeWhileIncreasingOnreadIORefUntil***ghc-prim GHC.ClassesEq showMutantdefaultFunctionNames defaultNames isUnmutated isFunction showMutantSshowMutantSAsTuple showLambda showBindingsfvnamesapplybaseGHC.BaseStringisInfixtoPrefix+- UnmutatedAtomFunctionflattenshowMutantSBindingsprimemapFstmapSnd&leancheck-0.6.1-LbCDkv8og849213l1FtsyzTest.LeanCheck.CoreListableGHC.Listtailmutmutate mutationsFortiersMutantsOntemplate-haskellLanguage.Haskell.TH.SyntaxNameTest.LeanCheck.DerivederiveListable typeArityderiveMutableEXreallyDeriveMutablereallyDeriveMutableCascading typeConArgstypeConArgsThattypeConCascadingArgsThat normalizeTypenormalizeTypeUnits isInstanceOfisntInstanceOftypeConstructors isTypeSynonymtypeSynonymType|=>|nubMerge nubMergesTestablelisttiersTest.LeanCheck.TierssetsOfsetConsproductsproductMaybeWith product3With normalizeT noDupListsOf noDupListCons listsOfLengthlistsOfdeleteTbagsOfbagConsTest.LeanCheck.IOcheckResultFor checkResultcheckForcheckderiveListableCascadingtoTierstiersFractionalsuchThat productWithofWeightmapT listIntegralfilterTcons5cons4cons3cons2cons1cons0concatT concatMapT addWeight\\//\/><==>+|Test.LeanCheck.Basiccons9cons8cons7cons6cons12cons11cons10 witnesseswitnessresultsholdsfailsexistscounterExamplescounterExample getRawResultsgetRawResults'nSurv Properties propertyHolds propertyCEprocessRawResultrelevantPropertySetsrelevantImplications conjectures1reportWithExtra'showConjectures showResultsshowDetailedResultsshowNumberOfTestsAndMutantsshowPropertySetshowConjecture qualifyCMannotateTest.LeanCheck.Utils.TypesWord4unWord4Word3unWord3Word2unWord2Word1unWord1UInt4UInt3UInt2UInt1Nat7unNat7Nat6unNat6Nat5unNat5Nat4unNat4Nat3unNat3Nat2unNat2Nat1unNat1NatunNatInt4unInt4Int3unInt3Int2unInt2Int1unInt1groupImplicationsgenDotfileFromGI getDotfile writeDotfile putDotfile isObviousattachObviousness