h&2g/      !"#$%&'()*+,-./0123456789: ;< => ?@A B C D E F G H I J K L M N O P QRSTUVWXYZ[\]^_`abcdefghij k l m n o p q r s t u v w x y z { | }  Safe-Inferred rec-def!A class indicating that the type a is has a top element.rec-def!A class indicating that the type a is has a bottom element.rec-def#This class indicates that the type a) is partially ordered by some relation E.The class does not actually have a method for E, because we do not need it at runtime. Nevertheless the order better exists for the safety of this API.8This order may be unrelated to the total order given by ~.rec-defThe / method checks _related_ elements for equality.Formally: For all x E y, eqOfLe x y == True iff x == y.This can be more efficient than testing for equality. For example for sets, $ needs to compare the elements, but eqOfLe6 only needs to compare sizes. It is always ok to use  here.rec-defAdds 0 as a least element to an existing partial orderrec-defOrdered by '(<=)f'rec-def Ordered by  rec-defArbitrary using the  False < True order rec-defThe dual order rec-def Bottom is  rec-def Bottom is 0 rec-def Bottom is rec-def Bottom is rec-defTop is rec-defBottom is the  of a Safe-Inferred brec-defException thrown by a propagator when attempting to change the value of a frozen propagatorrec-defThe Propagator class defines some functions shared by different propagator implementations. This backs the generic Data.Propagator.Purify wrapper. Safe-Inferred  rec-defA cell in a propagator networkrec-def%Creates a cell, initialized to bottomrec-def/Creates a constant cell, given an initial valuerec-def#Reads the current value of the cellrec-def)Is the current propagator already frozen?rec-defMarks the propagator as frozen.Will prevent further calls to setProp and clears the list of watchers (to allow GC).rec-defSets a new value calculated from the given action. The action is executed atomically.*Throws if the propagator is already frozenIf the value has changed, all watchers are notified afterwards (not atomically). rec-defWatch a cell: If the value changes, the given action is executed!rec-defWhenever the first cell changes, update the second, using the given function"rec-defWhenever any of the first two cells change, update the third, using the given function#rec-defWhenever any of the cells in the list change, update the other, using the given function  !"#  !"# Safe-Inferredr %rec-defA type for propagators for the two-point lattice, consisting of bottom and toprec-def6Just act: Still bottom, run act (once!) when triggeredrec-defDefinitely bottom rec-defDefinitely top&rec-def'A new propagator, initialized at bottom'rec-def$A new propagator, already set to top(rec-def whenTop p act runs act if p is already top, or after setTop p is run)rec-defSet a propagator to top.6If it was bottom before, runs the actions queued with (. It does so after: setting the propagator to top, so that cycles are broken.*rec-defp1 * p2 chains propagators: If p1 becomes top, then so does p2.+rec-defQueries the current state of the propagator. All related calls to setTop3 that have executed so far are taken into account.rec-def0Freezes the value. Drops references to watchers.%&'()*+%&')(*+ Safe-Inferred/rec-defA - that is being evaluated-rec-defAn IO& action that is to be run at most once.rec-def Create a new - from an  action.The  action may return other thunks that should be forced together whenver this thunk is forced (in arbitrary order)/rec-def"A Thunk that that already is done.Equivalent to +do {t <- thunk (pure []); force t; pure t }0rec-defForce the execution of the thunk. If it has been forced already, it will do nothing. Else it will run the action passed to ., force thunks returned by that action, and not return until all of them are forced.-./0-./0 Safe-Inferred )*51rec-defA value of type Purify p is a propagator p,, gether with a (lazy) action to define it. You can use 6* to extract the value from the propagator.Do not use the extracted value in the definition of that value, this will loop just like a recursive definition with plain values would!2rec-defAny value of type a is also a value of type Purify p if p is a propagator for a.3rec-defDefines a value of type Purify b# to be a function of the values of Purify a.The action passed should declare that relation to the underlying propagator.The Prop a1 propagator must only be used for reading values from.4rec-defDefines a value of type Purify c# to be a function of the values of Purify a and Purify b.The action passed should declare that relation to the underlying propagator.The Prop a and Prop b2 propagators must only be used for reading values from.5rec-defDefines a value of type Purify b- to be a function of the values of a list of Purify a values.The action passed should declare that relation to the underlying propagator.The Prop a2 propagators must only be used for reading values from.6rec-defExtract the value from a Purify a. This must not be used when defining that value.123456162345 Safe-Inferred 7rec-defSee @. Can be extended as needed8rec-defLike #, but admits recursive definitions.:rec-defLike #, but admits recursive definitions.<rec-defLike , but admits recursive definitions, preferring the greatest solution.>rec-defLike , but admits recursive definitions, preferring the least solution.@rec-defA constrainted form of  that only resolves the newtypes from this module, in a directed way.&This improves type inference (e.g. if   was using * instead, it would need a type signature). The idiom is  https://discourse.haskell.org/t/haskell-mini-idiom-constraining-coerce/3814?u=nomeatadue to Daniel Daz Carrete. 789:;<=>?@ >?<=:;897@  Safe-Inferred!^Arec-def Extracts the value of a 'RSet a'Brec-defRB.get (RB.mk s) === sCrec-defRS.get RS.empty === S.emptyDrec-def)RS.get (RS.singleton x) === S.singleton xErec-def2RS.get (RS.insert n r1) === S.insert n (RS.get r1)Frec-def2RS.get (RS.delete n r1) === S.delete n (RS.get r1)Grec-def\(Fun _ p) -> RS.get (RS.filter p r1) === S.filter p (RS.get r1)Hrec-def;RS.get (RS.union r1 r2) === S.union (RS.get r1) (RS.get r2)Irec-def2RS.get (RS.unions rs) === S.unions (map RS.get rs)Jrec-defRS.get (RS.intersection r1 r2) === S.intersection (RS.get r1) (RS.get r2)Krec-def2RB.get (RS.member n r1) === S.member n (RS.get r1)Lrec-def9RDB.get (RS.notMember n r1) === S.notMember n (RS.get r1)Mrec-def)RDB.get (RS.null s) === S.null (RS.get s)Nrec-defRDB.get (RS.disjoint r1 r2) === S.disjoint (RS.get r1) (RS.get r2)Orec-defAn kind of if-then-else statement. Because of monotonicity requirements, this should be sufficient.RS.get (RS.when b r) === (if RB.get b then RS.get r else S.empty)Prec-defThe identity function. This is useful when tying the knot, to avoid a loop that bottoms out: let x = x in RS.get xwill not work, butlet x = RS.id x in RS.get x fromList []does.%| prop> RS.get (RS.id s) === RS.get s:ABCDEFGHIJKLMNOP:ABCDEFGHIJKLMNOP Safe-Inferred)gQrec-defExtracts the value of a MSetRrec-defRM.get (RM.mk m) === mSrec-defRM.get RM.empty === M.emptyTrec-def-RM.get (RM.singleton k v) === M.singleton k vUrec-def4RM.get (RM.insert k v m) === M.insert k v (RM.get m)Vrec-defRM.get (RM.insertWith (applyFun2 f) k v m) === M.insertWith (applyFun2 f) k v (RM.get m)Wrec-defRM.get (RM.insertWithKey (applyFun3 f) k v m) === M.insertWithKey (applyFun3 f) k v (RM.get m)Xrec-def0RM.get (RM.delete k m) === M.delete k (RM.get m)Yrec-defRM.get (RM.adjust (applyFun f) k m) === M.adjust (applyFun f) k (RM.get m)Zrec-defRM.get (RM.adjustWithKey (applyFun2 f) k m) === M.adjustWithKey (applyFun2 f) k (RM.get m)[rec-def;RM.get (RM.union m1 m2) === M.union (RM.get m1) (RM.get m2)\rec-defRM.get (RM.unionWith (applyFun2 f) m1 m2) === M.unionWith (applyFun2 f) (RM.get m1) (RM.get m2)]rec-defRM.get (RM.unionWithKey (applyFun3 f) m1 m2) === M.unionWithKey (applyFun3 f) (RM.get m1) (RM.get m2)^rec-defRM.get (RM.intersection m1 m2) === M.intersection (RM.get m1) (RM.get m2)_rec-defRM.get (RM.intersectionWith (applyFun2 f) m1 m2) === M.intersectionWith (applyFun2 f) (RM.get m1) (RM.get m2)`rec-defRM.get (RM.intersectionWithKey (applyFun3 f) m1 m2) === M.intersectionWithKey (applyFun3 f) (RM.get m1) (RM.get m2)arec-defRM.get (RM.map (applyFun f) m) === M.map (applyFun f) (RM.get m)brec-defRM.get (RM.mapWithKey (applyFun2 f) m) === M.mapWithKey (applyFun2 f) (RM.get m)crec-def-RM.get (RM.singleton k v) === M.singleton k vdrec-def.RS.get (RM.keysSet m) === M.keysSet (RM.get m)erec-defRM.get (RM.restrictKeys m s) === M.restrictKeys (RM.get m) (RS.get s)frec-def0RB.get (RM.member k m) === M.member k (RM.get m)grec-def9RDB.get (RM.notMember n r1) === M.notMember n (RM.get r1)hrec-defRDB.get (RM.disjoint m1 m2) === M.disjoint (RM.get m1) (RM.get m2)irec-def)RDB.get (RM.null m) === M.null (RM.get m)8QRSTUVWXYZ[\]^_`abcdefghi8QRSTUVWXYZ[\]^_`fghiabcde  Safe-Inferred, jrec-defExtracts the value of a  RDB.get (RDB.id r) === RDB.get r urec-defRB.get (RB.mk b) === bvrec-defRB.get RB.true == Truewrec-defRB.get RB.false == Falsexrec-def1RB.get (r1 RB.&& r2) === (RB.get r1 && RB.get r2)yrec-def1RB.get (r1 RB.|| r2) === (RB.get r1 || RB.get r2)zrec-def*RB.get (RB.and rs) === and (map RB.get rs){rec-def(RB.get (RB.or rs) === or (map RB.get rs)|rec-def'RB.get (RB.not r1) === not (RDB.get r1)}rec-defThe identity function. This is useful when tying the knot, to avoid a loop that bottoms out: let x = x in RB.get xwill not work, butlet x = RB.id x in RB.get xFalsedoes.RB.get (RB.id r) === RB.get r >tuvwxyz{|} >tuvwxyz{|} Safe-Inferred/ !!"#$%&'()#$&%*+,-./0123456789:;<=>?@ABCCDDEEFFG A = H I J K L M N O P Q R S T A=HIJUVKWXMYZO[\]^_`aPQSR A = b c d e f g h  A = b c d e f g h ijkijlmnopqHirsirtuvwxyzir{p|}pq~iri$rec-def-0.2.2-9reejIHtJ3zCdgVr9vtGsI Data.POrderData.Propagator.ClassData.Propagator.NaiveData.Propagator.P2System.IO.RecThunkData.Propagator.PurifyData.Recursive.InternalData.Recursive.MapData.Recursive.SetData.Recursive.DualBoolData.Recursive.BoolSsubsetOfidData.Recursive.ExamplesToptopBottombottomPOrdereqOfLe $fPOrderMaybe$fPOrderNatural $fPOrderSet $fPOrderBool $fPOrderDual $fBottomMaybe$fBottomNatural $fBottomSet $fBottomBool $fTopBool $fBottomDual WriteToFrozenPropagatorException PropagatornewProp newConstProp freezePropreadProp+$fExceptionWriteToFrozenPropagatorException&$fShowWriteToFrozenPropagatorExceptionPropsetProp watchProplift1lift2liftList$fPropagatorPropaP2newP2newTopP2whenTopsetTopimpliesisTop$fPropagatorP2BoolThunkthunk doneThunkforcePurifymkdef1def2defListgetOpenRRMapRSet RDualBoolRBoolopenRempty singletoninsertdeletefilterunionunions intersectionmember notMembernulldisjointwhen insertWith insertWithKeyadjust adjustWithKey unionWith unionWithKeyintersectionWithintersectionWithKeymap mapWithKeyfromSetkeysSet restrictKeystruefalse&&||andornotghc-prim GHC.ClassesOrd==base GHC.MaybeNothingcontainers-0.6.5.1Data.Set.Internal GHC.TypesFalseTrueisFrozen StillBottom SurelyBottom SurelyTopfreeze KickedThunkIOData.Map.InternalMapSetBoolGHC.Primcoerce