úÎ!+¿)÷     +(c) DD. 2012 (c) LFL. 2009 BSD-styleDrew Day<drewday@gmail.com> experimentalportableSafe)#relation!This implementation avoids using  "S.Set (a,b)"H because it it is necessary to search for an item without knowing both D and R.In S.Set&, you must know both values to search./Thus, we have are two maps to updated together. 5Always be careful with the associated set of the key.=If you union two relations, apply union to the set of values.;If you subtract, take care when handling the set of values.=As a multi-map, each key is asscoated with a Set of values v.*We do not allow the associations with the  Set.relationsize r. returns the number of tuples in the relation.relation&Construct a relation with no elements.relationBThe list must be formatted like: [(k1, v1), (k2, v2),..,(kn, vn)].relationBuilds a List from a Relation.relation Builds a & consiting of an association between: x and y.relationThe / that results from the union of two relations: r and s.relationThis fragment provided by: æ Module : Data.Map Copyright : (c) Daan Leijen 2002 (c) Andriy Palamarchuk 2008 License : BSD-style Maintainer : libraries@haskell.org Stability : provisional Portability : portable relation$Union a list of relations using the  relation.relationIntersection of two relations: a and b are related by intersection r s exactly when a and b are related by r and s. relationInsert a relation  x  and  y  in the relation  r relation&Delete an association in the relation. relation8The Set of values associated with a value in the domain. relation7The Set of values associated with a value in the range. relationTrue if the element  x  exists in the domain of  r .relation(True if the element exists in the range.relationTrue if the relation r is the  relation.relation.True if the relation contains the association x and yrelationTrue if the relation does not contain the association x and yrelation>Returns the domain in the relation, as a Set, in its entirety.relation=Returns the range of the relation, as a Set, in its entirety.relation%Returns the converse of the relation.relation1A compact set of sets the values of which can be  Just (Set x) or Nothing. The cases of  are purged.It is similar to .relation (Case b <| r a)relation ( Case a |> r b )relation0Domain restriction for a relation. Modeled on z.relation/Range restriction for a relation. Modeled on z.         !" #$%#relation-0.3-CE2d91C6jrl2f12rYLexj3 Data.RelationRelationsizeemptyfromListtoList singletonunionunions intersectioninsertdelete lookupDom lookupRan memberDom memberRannullmember notMemberdomranc compactSet<$||$><||>$fShowRelation $fEqRelation $fOrdRelation foldlStrictbase GHC.MaybeNothing Data.Foldableconcat