úÎ!WŽU*      !"#$%&'()Inspection Testing for Haskell(c) Joachim Breitner, 2017MITmail@joachim-breitner.de GHC specifcNone01>?]@Âinspection-testingThe result of /, which has a more or less helpful text messageinspection-testing2Properties of the obligation target to be checked.inspection-testingAre the two functions equal?More precisely: f is equal to g if either the definition of f is f = g, or the definition of g is g = f, or if the definitions are f = e and g = e. In general f and gV need to be defined in this module, so that their actual defintions can be inspected.EIf the boolean flag is true, then ignore types during the comparison.inspection-testingyDo none of these types appear anywhere in the definition of the function (neither locally bound nor passed as arguments)inspection-testing/Does this function perform no heap allocations.inspection-testing&Does this value contain dictionaries (except of the listed classes).inspection-testing:This data type describes an inspection testing obligation.$It is recommended to build it using „, for backwards compatibility when new fields are added. You can also use the more mnemonic convenience functions like '(===)' or .%The obligation needs to be passed to . inspection-testingkThe target of a test obligation; invariably the name of a local definition. To get the name of a function foo, write 'foo. This requires  {-# LANGUAGE TemplateHaskell #-}. inspection-testing)The property of the target to be checked. inspection-testingAn optional name for the test inspection-testing3Do we expect this property to fail? (Only used by  , not by )inspection-testingLThe source location where this obligation is defined. This is filled in by .inspection-testing If this is *d, then report errors during compilation. Otherwise, update the top-level definition with this name.inspection-testingjCreates an inspection obligation for the given function name with default values for the optional fields.inspection-testing'Declare two functions to be equal (see )inspection-testingbDeclare two functions to be equal, but ignoring type lambdas, type arguments and type casts (see )inspection-testingDDeclare two functions to be equal, but expect the test to fail (see  and  B) (This is useful for documentation purposes, or as a TODO list.)inspection-testingKDeclare that in a function s implementation, the given type does not occur.ŠMore precisely: No locally bound variable (let-bound, lambda-bound or pattern-bound) has a type that contains the given type constructor.  $ fusedFunction `` ''[]inspection-testing[Declare that a function s implementation does not contain any generic types. This is just asNoType1 applied to the usual type constructors used in  GHC.Generics. 'inspect $ hasNoGenerics genericFunctioninspection-testingGDeclare that a function's implementation does not include dictionaries.‘More precisely: No locally bound variable (let-bound, lambda-bound or pattern-bound) has a type that contains a type that mentions a type class.  $  specializedFunctioninspection-testing A variant of &, which white-lists some type-classes.  $ fieldLens ` ` [''Functor]inspection-testingLAs seen in the example above, the entry point to inspection testing is the  function, to which you pass an 0. It will report test failures at compile time.inspection-testingwThis is a variant that allows compilation to succeed in any case, and instead indicates the result as a value of type :, which allows seamless integration into test frameworks.This variant ignores the  • field of the obligation. Instead, it is expected that you use the corresponding functionality in your test framework (e.g. tasty-expected-failure)+inspection-testingWLike newName, but even more unique (unique across different splices), and with unique nameBasehs. Precondition: the string is a valid Haskell alphanumeric identifier (could be upper- or lower-case).    9 9 9 None<O÷inspection-testing5Selects those bindings that define the given variableinspection-testingPretty-print a sliceinspection-testingCPretty-print two slices, after removing variables occurring in both inspection-testingÃThis is a heuristic, which only works if both slices have auxiliary variables in the right order. (This is mostly to work-around the buggy CSE in GHC-8.0) It also breaks if there is shadowing.!inspection-testingReturns True] if the given core expression mentions no type constructor anywhere that has the given name."inspection-testingQTrue if the given variable binding does not allocate, if called fully satisfied.’It currently does not look through function calls, which of course could allocate. It should probably at least look through local function calls.<The variable is important to know the arity of the function. inspection-testing ignore types  !"# !"#None"#]^Tö$inspection-testing#The plugin. It supports the option .-fplugin-opt=Test.Inspection.Plugin:keep-going to ignore a failing build.,inspection-testing>Like show, but omit the module name if it is he current module-inspection-testing,like prettySrcLoc, but omits the module name$$.       !"#$%&'()*+,-./0123-inspection-testing-0.4-9HJnHqzCmObLACgsXFA6hETest.InspectionTest.Inspection.CoreTest.Inspection.PluginResultFailureSuccessPropertyEqualToNoTypes NoAllocation NoTypeClasses ObligationtargetpropertytestName expectFailsrcLoc storeResult mkObligation=====-=/= hasNoType hasNoGenericshasNoTypeClasseshasNoTypeClassesExceptinspect inspectTest$fDataProperty$fDataObligation $fShowResultslicepprSlicepprSliceDifferenceeqSlice freeOfTypedoesNotAllocatedoesNotContainTypeClassesplugin$fEqUponFailure $fEnumStat$fEqStat $fOrdStat $fBoundedStatbaseGHC.BaseNothing newUniqueName showTHNamemyPrettySrcLoc