}$      !"# 3gERP, 2010All Rights Reserved Patrick BahrunknownunknownNone6nThis is the top-level data structure that represents an equivalence relation. An equivalence relation of type  s c a% lives in the state space indexed by s1, contains equivalence class descriptors of type c and has elements of type a. $7maps elements to their entry in the tree data structure%@constructs an equivalence class descriptor for a singleton class&[combines the equivalence class descriptor of two classes which are meant to be combined.'TThis type represents entries (nodes) in the tree data structure. Entry data of type ' s c a% lives in the state space indexed by s1, contains equivalence class descriptors of type c and has elements of type a. (ZThis type represents a reference to an entry in the tree data structure. An entry of type ( s c a% lives in the state space indexed by s1, contains equivalence class descriptors of type c and has elements of type a.This function constructs the initial data structure for maintaining an equivalence relation. That is it represents, the fines (or least) equivalence class (of the set of all elements of type aE). The arguments are used to maintain equivalence class descriptors. )rThis function returns the representative entry of the argument's equivalence class (i.e. the root of its tree) or Nothing$ if it is the representative itself.*This function performs path compression. *oThis function returns the representative entry of the argument's equivalence class (i.e. the root of its tree).*This function performs path compression. +yThis function provides the representative entry of the given equivalence class. This function performs path compression. ,This function constructs a new (root) entry containing the given entry's value, inserts it into the lookup table (thereby removing any existing entry). -This function constructs a new (root) entry containing the given value, inserts it into the lookup table (thereby removing any existing entry). PThis function provides the equivalence class the given element is contained in. .jThis function looks up the entry of the given element in the given equivalence relation representation or Nothing if there is none, yet. /This function equates the two given elements. That is, it unions the equivalence classes of the two elements and combines their descriptor. The returned entry is the representative of the new equivalence class This function combines all equivalence classes in the given list. Afterwards all elements in the argument list represent the same equivalence class! This function combines the two given equivalence classes. Afterwards both arguments represent the same equivalence class! One of it is returned in order to represent the new combined equivalence class. This function equates the element in the given list. That is, it unions the equivalence classes of the elements and combines their descriptor. This function equates the two given elements. That is, it unions the equivalence classes of the two elements and combines their descriptor. EThis function returns the descriptor of the given equivalence class. OThis function returns the descriptor of the given element's equivalence class. NThis function decides whether the two given equivalence classes are the same. This function decides whether the two given elements are in the same equivalence class according to the given equivalence relation representation. 07This function modifies the content of a reference cell.16This function marks the given root entry as deleted. dThis function removes the given equivalence class. If the equivalence class does not exists anymore False is returned; otherwise True. rThis function removes the equivalence class of the given element. If there is no corresponding equivalence class, False is returned; otherwise True. *2$%&3'456789:(;<=Gused to construct an equivalence class descriptor for a singleton classbused to combine the equivalence class descriptor of two classes which are meant to be combined.)*+,the constructed entry-the constructed entry>./? 01     2$%&3'849:56:7(;<=)*+,->./? 01 Patrick Bahr, 2010All Rights Reserved Patrick BahrunknownunknownNone23468HMfThis class specifies the interface for a monadic computation that maintains an equivalence relation. pThis function decides whether the two given elements are equivalent in the current equivalence relation WThis function obtains the descriptor of the given element's equivalence class. This function equates the element in the given list. That is, it unions the equivalence classes of the elements and combines their descriptor. uThis function equates the given two elements. That is it unions the equivalence classes of the two elements. xThis function removes the equivalence class of the given element. If there is no corresponding equivalence class, False is returned; otherwise True. VThis function provides the equivalence class the given element is contained in. This function combines all equivalence classes in the given list. Afterwards all elements in the argument list represent the same equivalence class! This function combines the two given equivalence classes. Afterwards both arguments represent the same equivalence class! One of it is returned in order to represent the new combined equivalence class. TThis function decides whether the two given equivalence classes are the same. KThis function returns the descriptor of the given equivalence class. jThis function removes the given equivalence class. If the equivalence class does not exists anymore False is returned; otherwise True.  This monad is a special case of C that only maintains trivial equivalence class descriptors of type (). hThis monad encapsulates computations maintaining an equivalence relation. A monadic computation of type  s c v a) maintains a state space indexed by type s:, maintains an equivalence relation over elements of type v, with equivalence class descriptors of type c and returns a value of type a. ,This monad transformer is a special case of C that only maintains trivial equivalence class descriptors of type (). tThis monad transformer encapsulates computations maintaining an equivalence relation. A monadic computation of type   s c v m a) maintains a state space indexed by type s:, maintains an equivalence relation over elements of type v, with equivalence class descriptors of type c6 and contains an internal monadic computation of type m a. This function runs a monadic computation that maintains an equivalence relation. The first tow arguments specify how to construct an equivalence class descriptor for a singleton class and how to combine two equivalence class descriptors. !#This function is a special case of  C that only maintains trivial equivalence class descriptors of type (). "This function runs a monadic computation that maintains an equivalence relation. The first tow arguments specify how to construct an equivalence class descriptor for a singleton class and how to combine two equivalence class descriptors. ##This function is a special case of "C that only maintains trivial equivalence class descriptors of type (). $ Gused to construct an equivalence class descriptor for a singleton classbused to combine the equivalence class descriptor of two classes which are meant to be combined.!"Gused to construct an equivalence class descriptor for a singleton classbused to combine the equivalence class descriptor of two classes which are meant to be combined.#@ABCDEFGHIJKLM !"# !"#  !"#@ABCDEFGHIJKLMN          !"#$%&'()*+,-./01 23456789:;<=>?@ABCequivalence-0.2.6Data.Equivalence.STTData.Equivalence.MonadEquivClass leastEquivgetClass combineAllcombine equateAllequatedesc classDescsame equivalentremove removeClass MonadEquiv===EquivM'EquivMEquivT'EquivTunEquivT runEquivT runEquivT' runEquivM runEquivM'entries singleDesccombDesc EntryDataEntryrepresentative'representativeclassRepmkEntry'mkEntrygetEntry equateEntry modifySTRef removeEntryEntriesRoot entryDesc entryWeight entryDeletedNode entryParent entryValueunentry getEntry'combineEntries$fMonadEquivcvdReaderT$fMonadEquivcvdStateT$fMonadEquivcvdExceptT$fMonadEquivcvdErrorT$fMonadEquivcvdWriterT$fMonadEquivClassvdEquivT$fMonadErroreEquivT$fMonadStatestEquivT$fMonadWriterwEquivT$fMonadReaderrEquivT$fMonadTransEquivT $fMonadEquivT$fApplicativeEquivT$fFunctorEquivT