h&?<      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh  Safe-InferredijklmnopOption spec for TLT(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-InferredcTLTRecord of options which may be specified for running and reporting TLT tests.TLTDefault initial options.TLT*Update the display of showing passes in a  record.TLT*Update the display of showing passes in a  record.Results representation for TLT(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-Inferred TLTHierarchical structure holding the result of running tests, possibly grouped into tests. TLTThe qs are respectively the total number of tests executed, and total number of failures detected. TLTReasons why a test might fail. TLTA failure arising from an    which is not met. TLTA failure associated with a call to a Haskell function triggering an error. TLTDefault conversion of a   to a descriptive string.TLT0Return the number of failed tests reported in a .TLT*Return the number of tests described by a .TLT:Return the number of failed tests described in a list of s.TLT2Return the number of tests described in a list of s.     $Testing in a monad transformer layer(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-Inferred wTLTAccumulator for test results, in the style of a simplified Huet's zipper which only ever adds to the end of the structure.TLTAdd a single test result to a .TLT)Convert the topmost group of a bottom-up 3 into a completed top-down report about the group.TLT Derive a new  corresponding to finishing the current group and continuing to accumulate results into its enclosure.TLT Convert a  into a list of top-down s.$Testing in a monad transformer layer(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-InferredoTLTEnabling TLT checking of the completion of computations with- or without uncaught exceptions in a (possibly embedded) r or s monad.:In general, it is more difficult to automatically deduce MonadTLTExcept instances than MonadTLT because  instances bodies will frequently require additional parameters to functions such as t, or values corresponding to u., which are specific to a particular scenario.Note that using MonadTLTExcept# imposes the restriction that the . transformer layer must be wrapped within the r transformer layer.TLTEncodes how an embedded r8 monad can be lifted to the top-level monad stack type m.TLT-Runs the layers of the monad stack above the r? layer, exposing that latter layer. Serves as an inverse of .TLT Extending  operations across other monad transformers. For easiest and most flexible testing, declare the monad transformers of your application as instances of this class.TLTLift TLT operations within a monad transformer stack. Note that with enough transformer types included in this class, the liftTLT function should usually be unnecessary: the commands in this module which actually configure testing, or specify a test, already liftTLT their own result. So they will all act as top-level transformers in MonadTLT.TLTMonad transformer for TLT tests. This layer stores the results from tests as they are executed.!TLT Synonym for the elements of the  state."TLT!Execute the tests specified in a  monad without output side-effects, returning the final options and result reports.This function is primarily useful when calling TLT from some other package. If you are using TLT itself as your test framework, and wishing to see its human-oriented output directly, consider using   instead.#TLTThis function controls whether   will report only tests which fail, suppressing any display of tests which pass, or else report the results of all tests. The default is the former: the idea is that no news should be good news, with the programmer bothered only with problems which need fixing.$TLT(This function controls whether the main   executable should exit after displaying test results which include at least one failing test. By default, it will exit in this situation. The idea is that a test suite can be broken into parts when it makes sense to run the latter parts only when the former parts all pass.%TLTReport a failure. Useful in pattern-matching cases which are entirely not expected.&TLT+Report a success. Useful in default cases.'TLTOrganize the tests in the given subcomputation as a separate group within the test results we will report.(TLTEnsure that a computation in r* completes without an uncaught exception.)TLTEnsure that a computation in r* completes without an uncaught exception.*TLTEnsure that a computation in r does throw an uncaught exception, allowing further testing of the exception.+TLTEnsure that a computation in r# does throw an uncaught exception.8TLTThe 3 function in this case simply discards any output.9TLTThe 3 function in this case simply discards any output.:TLTWe can infer general instances for other monad transformer types when their run3 function does not take some initializing argument.;TLTThe r instance is a base case; here the lift/run functions are simply v. !"#$%&'()*+! "#$%&'()*+$Testing in a monad transformer layer(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-Inferred  @TLT!Execute the tests specified in a / monad, and report the results as text output.When using TLT from some other package (as opposed to using TLT itself as your test framework, and wishing to see its human-oriented output directly), consider using " instead.ATLTReport the results of tests.BTLT2Command to set an ANSI terminal to boldface black.CTLT0Command to set an ANSI terminal to boldface red.DTLT2Command to set an ANSI terminal to boldface green.ETLT5Command to set an ANSI terminal to medium-weight red.FTLT7Command to set an ANSI terminal to medium-weight green.GTLT6Command to set an ANSI terminal to medium-weight blue.HTLT7Command to set an ANSI terminal to medium-weight black.ITLTCommand to set an ANSI terminal to the standard TLT weight and color for a passing test.JTLTCommand to set an ANSI terminal to the standard TLT weight and color for a failing test. @ABCDEFGHIJ @ABCDEFGHIJ(Assertions and related utilities for TLT(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-Inferred, KTLTAn assertion is a computation (typically in the monad wrapped by ) which returns a list of zero of more reasons for the failure of the assertion. A successful computation returns an empty list: no reasons for failure, hence success.LTLT3This assertion always fails with the given message.MTLTThis assertion always succeeds.NTLTLabel and perform a test of an K.Example test :: Monad m => TLT m () test = do "2 is 2 as result" ~: 2 @== return 2 -- This test passes. "2 not 3" ~: 2 @/=- 3 -- This test fails.OTLT3Label and perform a test of a (pure) boolean value.Example test :: Monad m => TLT m () test = do "True passes" ~::- return True -- This test passes. "2 is 2 as single Bool" ~::- return (2 == 2) -- This test passes. "2 is 3!?" ~::- myFn 4 "Hammer" -- Passes if myFn (which -- must be monadic) -- returns True.PTLTLabel and perform a test of a boolean value returned by a computation in the wrapped monad m.Example test :: Monad m => TLT m () test = do "True passes" ~::- True -- This test passes. "2 is 2 as single Bool" ~::- 2 == 2 -- This test passes. "2 is 3!?" ~::- 2 == 2 -- This test fails.QTLTTransform a binary function on an expected and an actual value (plus a binary generator of a failure message) into an K for a pure given actual value.Example$TLT's scalar-testing operators like @==-! are defined with this function: (@==-) :: (Monad m, Eq a, Show a) => a -> a -> Assertion m (@==-) = liftAssertion2Pure (==) $ \ exp actual -> "Expected " ++ show exp ++ " but got " ++ show actualThe w operator tests equality, and the result here allows the assertion that a value should be exactly equal to a target. The second argument formats the detail reported when the assertion fails.RTLT Given an K; for two pure values (expected and actual), lift it to an K? expecting the actual value to be returned from a computation.ExamplesThe TLT assertion `Test.TLT.(==)` lifts `Test.TLT.(==-)` (both defined in   ) from expecting a pure actual result to expecting a computation returning a value to test. (@==) :: (Monad m, Eq a, Show a) => a -> m a -> Assertion m (@==) = assertion2PtoM (@==-)STLTTransform a binary function on expected and actual values (plus a generator of a failure message) into an K where the actual value is to be returned from a subcomputation.TTLTTransform a unary function on a value (plus a generator of a failure message) into a unary function returning an K for a pure given actual value.ExampleThe TLT assertion   (defined in   ) is built from the x predicate y emptyP :: (Monad m, Traversable t) => t a -> Assertion m emptyP = liftAssertionPure null (\ _ -> "Expected empty structure but got non-empty")UTLT Given an K+ for a pure (actual) value, lift it to an K7 expecting the value to be returned from a computation.ExampleThe TLT assertion   (defined in   ) on monadic computations returning lists is defined in terms of the corresponging assertion on pure list-valued expressions. empty :: (Monad m, Traversable t) => m (t a) -> Assertion m empty = assertionPtoM emptyPVTLTTransform a unary function on an actual value (plus a generator of a failure message) into an K: where the value is to be returned from a subcomputation. KLMNOPQRSTUV KLMNOPQRSTUVN0O0P0 Standard test operations for TLT(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-Inferred;(WTLTAssert that two values are equal. This assertion takes an expected and an actual value; see X to compare the result of a monadic computation to an expected value.Examples test :: Monad m => TLT m () test = do "Make sure that 2 is still equal to itself" ~: 2 @==- 2 "Make sure that there are four lights" ~: 4 @==- length lightsXTLTAssert that a calculated value is as expected. This assertion compare the result of a monadic computation to an expected value; see W to compare an  actual value to the expected value.Examples test :: Monad m => TLT m () test = do "Make sure that 2 is still equal to itself" ~: 2 @== return 2 "Make sure that there are four lights" ~: 4 @== countLights -- where countLights :: m IntYTLTAssert that two values are not equal. This assertion takes an expected and an actual value; see Z to compare the result of a monadic computation to an expected value.ZTLTAssert that a calculated value differs from some known value. This assertion compares the result of a monadic computation to an expected value; see Y to compare an  actual value to the expected value.[TLTAssert that a given boundary is strictly less than some value. This assertion takes an expected and an actual value; see \ to compare the result of a monadic computation to an expected value.\TLTAssert that a given, constant boundary is strictly less than some calculated value. This assertion compares the result of a /monadic computation/ to an expected value; see [ to compare an  actual value to the expected value.]TLTAssert that a given boundary is strictly less than some value. This assertion takes an expected and an actual value; see ^ to compare the result of a monadic computation to an expected value.^TLTAssert that a given, constant boundary is strictly less than some calculated value. This assertion compares the result of a /monadic computation/ to an expected value; see ] to compare an  actual value to the expected value._TLTAssert that a given boundary is strictly less than some value. This assertion takes an expected and an actual value; see ` to compare the result of a monadic computation to an expected value.`TLTAssert that a given, constant boundary is strictly less than some calculated value. This assertion compares the result of a /monadic computation/ to an expected value; see _ to compare an  actual value to the expected value.aTLTAssert that a given boundary is strictly less than some value. This assertion takes an expected and an actual value; see b to compare the result of a monadic computation to an expected value.bTLTAssert that a given, constant boundary is strictly less than some calculated value. This assertion compares the result of a /monadic computation/ to an expected value; see a to compare an  actual value to the expected value.cTLTAssert that a pure traversable structure (such as a list) is empty.dTLTAssert that a traversable structure (such as a list) returned from a computation is empty.eTLTAssert that a pure traversable structure (such as a list) is nonempty.fTLTAssert that a traversable structure (such as a list) returned from a computation is non-empty.gTLTAssert that a z value is u.hTLTAssert that a z result of a computation is u.WXYZ[\]^_`abcdefghWXYZ[\]^_`abcdefgh W1X1Y1Z1[1\1]1^1_1`1a1b1 $Testing in a monad transformer layer(c) John Maraist, 2022GPL3haskell-tlt@maraist.org experimentalPOSIX Safe-Inferred<'-#$%'()*+@KLMNOPQRSTUVWXYZ[\]^_`abcdefgh-@#$NPO%'KWY[]_aXZ\^`bdfcehgLMTUVQRS)(+* !"#$%&'()*+,,-./0123456789:;<=>?@ABCDEFGHIJKL MNOPQRSTUV WXYZ[\]^_`abcdefghijklm nopqrstuvwxyz{|}~}~}z"TLT-0.5.0.0-DdKa7XHHCpXLtMebmgqGlsTest.TLT.OptionsTest.TLT.ResultsTest.TLT.BufferTest.TLT.ClassTest.TLT.ReportTest.TLT.AssertionTest.TLT.Standard Paths_TLTTest.TLT AssertiontltStandardemptyPemptyTLTopts optShowPassesoptQuitAfterFailReport defaultOptswithShowPasseswithExitAfterFail TestResultTestGroupTestFailAssertedErred formatFail failCount testCounttotalFailCounttotalTestCountTRBufBufTop addResult currentGrouppopGroup closeTRBufMonadTLTExcept liftTLTExcept runToExceptMonadTLTliftTLTTLTunwrapTLTstaterunTLTreportAllTestResultssetExitAfterFailDisplaytltFailtltPassinGroup noUncaught_ noUncaught uncaughtWithuncaught$fMonadTLTWriterTn$fMonadTLTWriterTn0$fMonadTLTSTTn$fMonadTLTStateTn$fMonadTLTExceptTn$fMonadTLTStateTn0$fMonadTLTResourceTn$fMonadTLTReaderTn$fMonadTLTMaybeTn$fMonadTLTIdentityTn$fMonadTLTFreeTn$fMonadTLTTLTm$fMonadTLTExceptWriterTentne$fMonadTLTExceptWriterTentne0$fMonadTLTExceptIdentityTentne$fMonadTLTExceptExceptTentm $fFunctorTLT$fApplicativeTLT $fMonadTLT$fMonadTransTLTreport boldBlackboldRed boldGreen mediumRed mediumGreen mediumBlue mediumBlack greenPassredFail assertFailed assertSuccess~:~::-~::liftAssertion2Pureassertion2PtoMliftAssertion2MliftAssertionPure assertionPtoMliftAssertionM@==-@==@/=-@/=@<-@<@>-@>@<=-@<=@>=-@>= nonemptyPnonemptynothingPnothingversiongetDataFileName getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirghc-prim GHC.TypesInttransformers-0.5.6.2Control.Monad.Trans.ExceptExceptTExceptControl.Monad.Trans.Reader runReaderTbase GHC.MaybeNothingGHC.Baseid GHC.Classes==Data.Traversable Traversable Data.FoldablenullMaybe