h$7G2      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                               BSD-3autotaker@gmail.com experimental Safe-Inferred8>methodTuple constructormethod Nullary tuple  11BSD-3autotaker@gmail.com experimentalNone.9>? method Interface is a record whose fields are methods. The instance can be derived via . Here is an example:  {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-} data FizzBuzz env = FizzBuzz { printFizz :: RIO env (), printBuzz :: RIO env (), printFizzBuzz :: RIO env (), printInt :: Int -> RIO env () } deriving(Generic) instance Interface FizzBuzz where type IBase FizzBuzz = RIO Notesiface' takes an (poly-kinded) type parameter k8, which is the parameter to specify the base monad.Base monads of each fields must be the same. (Interface cannot contain any fields which are not a method)method IBase iface k4 is the base monad for each method of the interface.methodNatural transformation from m to nmethodMethod a is a function of the form a1 -> a2 -> ... -> an -> m b where m is MonadTypical monads in transformers package are supported. If you want to support other monads (for example M#), add the following boilerplate. >instance Method (M a) where Base (M a) = M Ret (M a) = a Caution Function monad (-> r) cannot be an instance of  methodUnderling monad !Base (a1 -> ... -> an -> m b) = m!methodArguments tuple of the method /Args (a1 -> ... -> an -> m b) = a1 :* ... :* an"methodReturn type of the method !Ret (a1 -> ... -> an -> m b) = b#method Convert method to unary function$method&Reconstruct method from unary function%methodGeneralization of join function&method5Insert hooks before/after calling the argument method'method5Insert hooks before/after calling the argument method(methodInsert hooks only before calling the argument method. Because it's free from * constraint, any methods are supported.)method+invoke method taken from reader environment*methodSpecilized version of mapBase for .  "!$#%&'()* "!$# &'()%*None?Emethod4A type class whose behavior is specified by a methodFmethodType of the first argument of H9, representing the condition when the method is calledGmethodType of the second argument of H(, representing a method to be called.Hmethod9Specify behavior from a pair of a condition and a method.Imethod8Specify behavior that return a constant value for a callJmethod3Specify behavior that executes an action for a callEFGHIJEFGHIJBSD-3autotaker@gmail.com experimental Safe-Inferred>\Kmethod Matcher for  "args ((==2), (>3)) (2 :* 4 :* Nil)Trueargs even (1 :* Nil)False args () NilTrueMmethod2Convert a tuple of matchers to a matcher of tuplesOmethodMatcher that matches anythingPmethod synonym of 7 function. Use this function for improving readabilityQmethod0Convert a tuple matcher to a tuple-like matcher..args' (\(a, b) -> a * b == 10) (2 :* 5 :* Nil)True.args' (\(a, b) -> a * b == 10) (2 :* 4 :* Nil)False  KLMNOPQ OPN KLMQBSD-3autotaker@gmail.com experimentalNone 9>?Zmethod Generalizes  and `\method ToDyn a b% provides a function to convert type b to type a , where b is a type whose dynamic type occurences are replaced by concrete types. For example: =ToDyn (Int, Dynamic, Maybe Dynamic) (Int, Bool, Maybe String)]method0convert value of specified type to dynamic value^method FromDyn a b% provides a function to convert type a to type b , where b is a type whose dynamic type occurences are replaced by concrete types. For example: ?FromDyn (Int, Dynamic, Maybe Dynamic) (Int, Bool, Maybe String)_methodconvert dynamic value to specified type. It thows runtime exception if the dynamic value does not have specified type.`methodDynamic value whose content is showable. Using this type instead of 7 is recommended because it gives better error messages.amethod;convert a dynamically-typed method to a polymorphic method.  fDyn :: String -> DynamicShow -> Dynamic -> IO [DynamicShow] fDyn = ... fPoly :: (Typeable a, Show a, Typeable b, Typeable c, Show c) => String -> a -> b -> IO [c] fPoly = castMethod fDyn bmethodConvert given matcher to dynamic matcher. The dynamic matcher matches a dynamic value only if the value has the type of given matcher. Z[\]^_`ab `abZ[^_\]BSD-3autotaker@gmail.com experimentalNone -9? methodf :|: g is the disjoint union of label f and label g. Use this type when you want to specify a protocol for multiple interfaces.Example data FooService = FooService { foo :: Int -> IO Bool, ... } data BarService = BarService { bar :: String -> IO (), ... } deriveLabel ''FooService deriveLabel ''BarService proto :: ProtocolM (FooServiceLabel 9 BarServiceLabel) () proto = do i1 <- decl $ whenArgs (8 Foo) (==1) `thenReturn` True void $ decl $ whenArgs ( Bar) (=="bar") `thenReturn` () `dependsOn` [i1] main :: IO () main = withProtocol proto $ \(fooService, barService) -> do ... methodType class that represents f$ denotes the type of field names of  InterfaceOf fmethod!Interface type corrensponding to fmethodConstruct a interface from polymorphic function that returns each field of the interface.method2Generate the label type from given interface type. Define GADT  XXXLabel m for interface XXX.FieldX :: XXXLabel X for each field  fieldX :: X where X is a standard type.$PolyFieldX :: XXXLabel ty[Dynamic/a] for each field of the form *polyFieldX :: (forall a. Typeable a => ty)Type variable a is substituted with  DynamicShow if a is instances of  and Type variable a is substituted with Dynamic if a is an instance of  but not !Report an error if type variable a is not an instance of Define instance Label XXXLabel.Example data API env = API { _foo :: Int -> RIO env Int, _bar :: forall a. (Show a, Typeable a) => String -> RIO env (Maybe a), _baz :: forall b. (Typeable a) => b -> RIO env () } deriveLabel ''API" will generate the following code. data APILabel env m where Foo :: APILabel env (Int -> RIO env Int) Bar :: APILabel env (String -> RIO env (Maybe DynamicShow)) -- type variable `a` is replaced with ` Baz :: APILabel env (Dynamic -> RIO env ()) -- type variable 'b' is replaced with  instance Label (APILabel env) where type InterfaceOf (APILabel env) = API env toInterface k = API (k Foo) (castMethod (k Bar)) (castMethod (k Baz)) showLabel x = case x of Foo -> Foo Bar -> Bar Baz -> Baz  BSD-3autotaker@gmail.com experimentalNone 2>?#emethodgenerate a method from Mock DSL. Mock DSL consists of rules. On a call of generated method, the first rule matched the arguments is applied.method matcher means the method raises a runtime exception if the arguments matches matcher%. The argument tuple is converted to  by using  function.method fshow matcher means the method raises runtime exception if the arguments matches matcher%. The argument tuple is converted to  by using fshow function.HIJIJHBSD-3autotaker@gmail.com experimentalNone%methodMonitor arg ret: is an event monitor of methods, which logs method calls.methodnewtype to compare values via method8newtype to implement show instance which shows its type.method args ret is a function call eventmethod represents call identifiermethodGenerate new instance of method0Increment the clock and return the current tick.method logs an event BSD-3autotaker@gmail.com experimentalNone?+method!watchBy fArgs fRet monitor method decorates method so that monitor logs the method calls. This function is suited for monitoring multiple methods.fArgs and fRet: is converter for arguments/return values of given method. foo :: Int -> IO String foo = ... bar :: Int -> String -> IO () bar = ... data MonitorArgs = FooArgs Int | BarArgs (Int,String) deriving(Eq,Show) data MonitorRet = FooRet String | BarRet () deriving(Eq, Show) foo' :: Monitor MonitorArgs MonitorRet -> Int -> IO String foo' monitor = watch monitor (FooArgs . toTuple) FooRet foo bar' :: Monitor MonitorArgs MonitorRet -> Int -> String -> IO () bar' monitor = watch monitor (BarArgs . toTuple) BarRet bar methodSimplified version of *. It is suitable to monitor single method.method#Get current event logs from monitormethod countMatcher eventMatcher counts events that matches  eventMatcher , and then the count matches  countMatchermethod matcher- matches method call whose arguments matches matchermethod withMonitor f calls f with , and then returns monitored event logs during the function call in addition to the return value of the function callmethodwithMonitor_ f calls f with ), and returns event logs during the call.   BSD-3autotaker@gmail.com experimentalNone#$'(-2>?0 method f provides mock methods, where f is a GADT functor that represents the set of dependent methods.methodwithProtocol proto action executes action% with a mock interface specified by proto, and then, it calls .methodBuild  from Protocol DSL.method'Get the mock interface from ProtocolEnvmethodGet the mock method by method name. Return a unstubed method (which throws exception for every call) if the behavior of the method is unspecified by ProtocolEnvmethodGet the mock method by method name. Return a unstubed method (which throws exception for every call) if the behavior of the method is unspecified by ProtocolEnv. Use this function only if you want to customize show implementation for the argument of the method.methodDeclare a method call specification. It returns the call id of the method call.method/Specify the argument condition of a method callmethod/Specify on which method calls the call depends.methodVerify that all method calls specified by Protocol DSL are fired.methodname of methodmethod(show function for the argument of methodmethodname of methodHIJHJI BSD-3autotaker@gmail.com experimentalNone1w3 HIJKMNOPQ\]^_`ab3IJH`ab^_\]NOP KMQ   !"#$%&'()*+,-. /0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                    %method-0.4.0.0-KoA3vlXutX8LfnLeoDArblTest.Method.DynamicControl.Method.InternalControl.MethodTest.Method.BehaviorTest.Method.MatcherTest.Method.LabelTest.Method.MockTest.Method.Monitor.InternalTest.Method.MonitorTest.Method.ProtocolArgs Test.MethodbaseData.Typeable.InternalTypeable Data.DynamicDynamic:*Nil TupleLikeAsTuple fromTupletoTuple $fShowNil$fTupleLikeNil $fTupleLike:*$fTupleLike:*0$fTupleLike:*1$fTupleLike:*2$fTupleLike:*3$fTupleLike:*4$fTupleLike:*5 $fShowTuple:*$fShowTupleNil$fShow:*$fEq:*$fOrd:* $fGeneric:*$fEqNil$fOrdNil InterfaceIBasemapBaseNTMethodBaseRet uncurryMethod curryMethodliftJoindecorate decorate_decorateBefore_invoke mapBaseRIO $fMethod->$fMethodWriterT$fMethodWriterT0$fMethodWriterT1$fMethodStateT$fMethodStateT0$fMethodSelectT$fMethodReaderT $fMethodRWST $fMethodRWST0 $fMethodRWST1$fMethodMaybeT$fMethodExceptT $fMethodContT$fMethodAccumT $fMethodST$fMethodEither $fMethod[] $fMethodMaybe$fMethodIdentity $fMethodRIO $fMethodIO$fLiftNTk:+::+:$fLiftNTk:*::*: $fLiftNTkM1M1 $fLiftNTkK1K1Behave ConditionMethodOf thenMethod thenReturn thenAction ArgsMatcher EachMatcherargsMatcheranythingwhenargs'$fArgsMatcher:*$fArgsMatcher:*0$fArgsMatcher:*1$fArgsMatcher:*2$fArgsMatcher:*3$fArgsMatcher:*4$fArgsMatcher:*5$fArgsMatcherNil DynamicLikeasDynToDyntoDynFromDynfromDyn DynamicShow castMethoddynArg$fShowDynamicShow$fFromDyn'M1M1$fFromDyn'U1U1$fFromDyn':*::*:$fFromDyn':+::+:$fFromDyn(,,,,,,)(,,,,,,)$fFromDyn(,,,,,)(,,,,,)$fFromDyn(,,,,)(,,,,)$fFromDyn(,,,)(,,,)$fFromDyn(,,)(,,)$fFromDyn(,)(,)$fFromDynEitherEither$fFromDynMaybeMaybe $fFromDyn[][] $fFromDyn:*:* $fFromDynaa$fFromDynDynamicShowa$fFromDynDynamica$fFromDyn'K1K1 $fToDyn'M1M1 $fToDyn'U1U1$fToDyn':*::*:$fToDyn':+::+:$fToDyn(,,,,,,)(,,,,,,)$fToDyn(,,,,,)(,,,,,)$fToDyn(,,,,)(,,,,)$fToDyn(,,,)(,,,)$fToDyn(,,)(,,) $fToDyn(,)(,)$fToDynEitherEither$fToDynMaybeMaybe $fToDyn[][] $fToDyn:*:* $fFromDyn->-> $fToDyn->-> $fToDynaa$fToDynDynamicShowa$fToDynDynamica $fToDyn'K1K1$fDynamicLikeDynamicShow$fDynamicLikeDynamic:|:LRLabel InterfaceOf toInterface showLabel compareLabel deriveLabel $fLabel:|:$fEq:|:$fOrd:|: $fShow:|:MockMMockmockup throwNoStubthrowNoStubWithShow$fMonoidMockSpec$fSemigroupMockSpec $fBehaveMockM$fMonadWriterMockSpecMockM $fMonadMockM$fApplicativeMockM$fFunctorMockMMonitor monitorTrace monitorClock EqUptoShowShowTypeClockEventEnterLeave eventTick eventArgseventEnterTickeventRetTickunTick newMonitorticklogEvent$fShowShowType$fOrdEqUptoShow$fEqEqUptoShow$fShowEqUptoShow $fEqEvent $fOrdEvent $fShowEvent $fEqShowType $fOrdShowType$fEqTick $fOrdTick $fShowTick $fEnumTickwatchBywatchlistenEventLogtimescall withMonitor withMonitor_ ProtocolM ProtocolEnvCallCallArgsCallId withProtocolprotocol mockInterface lookupMocklookupMockWithShowdeclwhenArgs dependsOnverify $fBehaveCall$fShowSomeMethodName$fOrdSomeMethodName$fEqSomeMethodName $fEqCallId $fOrdCallId $fShowCallId$fMonadProtocolM$fApplicativeProtocolM$fFunctorProtocolM GHC.GenericsGeneric,unliftio-core-0.2.0.1-9GVcmaajsglG88oErAZOTVControl.Monad.IO.Unlift MonadUnliftIO"rio-0.1.20.0-l029Av2eLy1FDrwaUKAs4RIO.Prelude.RIORIOGHC.BaseidGHC.ShowShowStringshow