h&2-      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                     Safe-Inferredhaggle'An abstract representation of a vertex.Note that the representation is currently exposed. Do not rely on this, as it is subject to change.haggleAn edge between two vertices. Safe-InferredhaggleThe empty inductive graphhaggleThe call let (c, g') = match g vdecomposes the graph into the  c of v and the rest of the graph g'.haggleReturn the context of a  haggleInsert a new labeled  into the graph. haggle Must return % if either the source or destination % is not in the graph. Also returns  if the edge already exists and the underlying graph does not support parallel edges.Otherwise return the inserted  and updated graph. haggleDelete the given . In a multigraph, this lets you remove a single parallel edge between two vertices. haggle,Delete all edges between a pair of vertices. haggleLike  4, but overwrite any existing edges. Equivalent to: let g' = deleteEdgesBetween g v1 v2 in insertLabeledEdge g v1 v2 lblhaggleUsed to update the label for a Vertex. The Vertex itself remains, but the label associated with the vertex is modified.haggle Remove a  from the graphhaggle&Contexts represent the "context" of a +, which includes the incoming edges of the , the label of the  , and the outgoing edges of the .haggle9The interface for immutable graphs with labeled vertices.haggle6The interface for immutable graphs with labeled edges.haggleThe interface for immutable graphs with efficient access to incoming edges.#haggle(The basic interface of immutable graphs.*haggle.This has a default implementation in terms of ', but is part of the class so that instances can offer a more efficient implementation when possible.+haggleAn interface for graphs that support looking at predecessor (incoming edges) efficiently..haggleAn interface for graphs that allow vertex and edge removal. Note that implementations are not required to reclaim storage from removed vertices (just make them inaccessible).=haggle Add a new  to the graph from src to dst. If either the source or destination is not in the graph, returns Nothing. Otherwise, the  reference is returned.?haggle Add a new $ to the graph, returning its handle.@haggle+The interface supported by a mutable graph.AhaggleThe type generated by Hing a mutable graphBhaggle&List all of the vertices in the graph.Chaggle"List the successors for the given .DhaggleGet all of the s with the given  as their source.Ehaggle*Return the number of vertices in the graphFhaggle'Return the number of edges in the graphGhaggleEdge existence test; this has a default implementation, but can be overridden if an implementation can support a better-than-linear version.Hhaggle1Freeze the mutable graph into an immutable graph.  !"#)%$&'*(+,-./0123456789:;<=>?@AHBCDEFGI@AHBCDEFG<=>?./01+,-789:;23456#)%$&'*(I !"  Safe-Inferred4Khaggle+This is a compact (mutable) directed graph.LhaggleCreate a new empty mutable graph with a small amount of storage reserved for vertices and edges.Mhaggle3Create a new empty graph with storage reserved for szVerts vertices and szEdges edges. %g <- newSizedMDigraph szVerts szEdgeshaggleGiven the root of a successor list, traverse it and accumulate all edges, stopping at -1.haggleGiven a graph, ensure that there is space in the vertex vector for a new vertex. If there is not, double the capacity.haggleEnsure that the graph has space for another edge. If there is not, double the edge capacity.ShaggleThe J9 is always in normal form, as the vectors are all unboxedJKLMKJLM Safe-InferredoThaggle An immutable bidirectional graphUhaggleA mutable bidirectional graphVhaggle>Allocate a new mutable bidirectional graph with a default sizeWhaggleAllocate a new mutable bidirectional graph with space reserved for nodes and edges. This can be more efficient and avoid resizing.haggleGiven a graph, ensure that there is space in the vertex vector for a new vertex. If there is not, double the capacity.WhaggleReserved space for nodeshaggleReserved space for edgesTUVWUTVW Safe-InferredhaggleAllocate a new  with n* bits. Bits are all initialized to zero. bs <- newBitSet nhaggle5Set a bit in the bitset. Out of range has no effect.haggle?Return True if the bit is set. Out of range will return False. Safe-Inferred8_haggleThe _ is a graph implementing the  interface (as well as the other immutable graph interfaces). It is based on the graph type provided by fgl.Inductive graphs support more interesting decompositions than the other graph interfaces in this library, at the cost of less compact representations and some additional overhead on some operations, as most must go through the  operator.This graph type is most useful for incremental construction in pure code. It also supports node removal from pure code.__ Safe-InferredhaggleGiven a graph, ensure that there is space in the vertex vector for a new vertex. If there is not, double the capacity.klmnlkmn Safe-InferredrwhaggleA x< wrapped up in a mutable ref for possibly easier access in }.xhaggle&A simple mapping from labels to their zhaggle !(v, m') <- vertexForLabel g m lbl Looks up the  for lbl in g . If no  in g has that label, a new 9 is allocated and returned. The updated vertex mapping m' is returned, too.{haggleA pure lookup to convert a  label into a .. If the label is not in the graph, returns .|haggleBuild a x from a # with  labels.}haggleExtract the pure x from the mutable ref. This is useful to retain the mapping after the graph is fully constructed.~haggleAllocate a new x buried in a mutable ref.haggle Just like z, but holding the mapping in a ref instead of threading it. Usage is simpler: v <- vertexForLabelRef g m lbl wxyz{|}~ xyz{|w~} Safe-Inferred!haggleAn adapter adding support for both vertex and edge labels for immutable graphs.haggleAn adapter adding support for both vertex and edge labels for mutable graphs.haggle$Note that we are not just using the nodeLabelStore directly. In graphs that support vertex removal, we do not want to include removed vertices, so we go through the public accessor. This is slower but easier to see as correct.haggleLikewise, we use  here instead of directly reading from the edge label storage array.haggleConstruct a graph from a labeled list of edges. The node endpoint values are used as vertex labels, and the last element of the triple is used as an edge label. Safe-Inferred$haggleBuild a new (immutable) graph from a list of edges. Edges are defined by pairs of  node labels . A new Vertex( will be allocated for each node label.The type of the constructed graph is controlled by the first argument, which is a constructor for a mutable graph.Example: import Data.Graph.Haggle.VertexLabelAdapter import Data.Graph.Haggle.SimpleBiDigraph let (g,m) = fromEdgeList newMSimpleBiDigraph [(0,1), (1,2), (2,3), (3,0)]g has type SimpleBiDigraph.An alternative that is fully polymorphic in the return type would be possible, but it would require type annotations on the result of , which could be very annoying. Safe-Inferred$  Safe-Inferred%  Safe-Inferred%Y !#+.2378<>@AJKLMTUVW_klmnKLMUVWlmnJTk_@A><7823.+# !  Safe-Inferred*%haggleThe most general DFShaggleForward parameterized DFShaggle Forward DFShaggleReverse parameterized DFShaggle Reverse DFShaggleUndirected parameterized DFS. This variant follows both incoming and outgoing edges from each .haggleUndirected DFShaggle$The most general depth-first forest.haggle6Return a list of each connected component in the graphhaggle%The number of components in the graphhaggle6True if there is only a single component in the graph.haggle6Topologically sort the graph; the input must be a DAG.haggleReturn a list of each strongly-connected component in the graph. In a strongly-connected component, every vertex is reachable from every other vertex.haggle2Compute the set of vertices reachable from a root .  Safe-Inferred,haggle7Compute the immediate dominators in the graph from the root . Each  reachable from the root will be paired with its immediate dominator. Note that there is no entry in the result pairing for the root ' because it has no immediate dominator.If the root vertex is not in the graph, an empty list is returned.haggle'Compute all of the dominators for each  reachable from the root. Each reachable  is paired with the list of nodes that dominate it, including the  itself. The root is only dominated by itself.       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                Q R S T U V W N L H I J C D E > ? @ ; < 3 4 5 6 9 X 8 1 - . ) * + & # $                                   $*4I!haggle-0.3-LQ54Ppc7yxHK58CoQK7KziData.Graph.Haggle.ClassesData.Graph.Haggle.DigraphData.Graph.Haggle.BiDigraphData.Graph.Haggle.PatriciaTree!Data.Graph.Haggle.SimpleBiDigraphData.Graph.Haggle.VertexMapData.Graph.Haggle.LabelAdapter$Data.Graph.Haggle.VertexLabelAdapter"Data.Graph.Haggle.EdgeLabelAdapterData.Graph.Haggle Data.Graph.Haggle.Algorithms.DFS'Data.Graph.Haggle.Algorithms.Dominators Data.Graph.Haggle.Internal.Basic!Data.Graph.Haggle.Internal.BitSet"Data.Graph.Haggle.Internal.AdapterVertexEdgevertexId edgeSourceedgeDestInductiveGraph emptyGraphmatchcontextinsertLabeledVertexinsertLabeledEdge deleteEdgedeleteEdgesBetweenreplaceLabeledEdgereplaceLabeledVertex deleteVertexContextHasVertexLabel VertexLabel vertexLabellabeledVerticesBidirectionalEdgeLabellabeledInEdges HasEdgeLabel EdgeLabel edgeLabel labeledEdgeslabeledOutEdges Bidirectional predecessorsinEdgesThawable MutableGraphthawGraphverticesedges successorsoutEdges maxVertexIdisEmpty edgesBetweenMBidirectionalgetPredecessors getInEdges MRemovable removeVertexremoveEdgesBetween removeEdgeMLabeledVertex MVertexLabelgetVertexLabeladdLabeledVertexgetLabeledVertices MLabeledEdge MEdgeLabel getEdgeLabelunsafeGetEdgeLabeladdLabeledEdgeMAddEdgeaddEdge MAddVertex addVertexMGraphImmutableGraph getVertices getSuccessors getOutEdges countVertices countEdgescheckEdgeExistsfreeze edgeExistsDigraphMDigraph newMDigraphnewSizedMDigraph$fMAddEdgeMDigraph$fMAddVertexMDigraph$fGraphDigraph$fThawableDigraph$fMGraphMDigraph$fNFDataDigraph BiDigraph MBiDigraph newMBiDigraphnewSizedMBiDigraph$fMBidirectionalMBiDigraph$fMAddEdgeMBiDigraph$fMAddVertexMBiDigraph$fBidirectionalBiDigraph$fGraphBiDigraph$fThawableBiDigraph$fMGraphMBiDigraph PatriciaTree $fNFDataCtx$fInductiveGraphPatriciaTree$$fBidirectionalEdgeLabelPatriciaTree$fBidirectionalPatriciaTree$fHasVertexLabelPatriciaTree$fHasEdgeLabelPatriciaTree$fGraphPatriciaTree$fBifunctorPatriciaTree$fNFDataPatriciaTree$fFunctorPatriciaTree $fFunctorCtxSimpleBiDigraphMSimpleBiDigraphnewMSimpleBiDigraphnewSizedMSimpleBiDigraph $fMBidirectionalMSimpleBiDigraph$fMAddEdgeMSimpleBiDigraph$fMAddVertexMSimpleBiDigraph$fBidirectionalSimpleBiDigraph$fGraphSimpleBiDigraph$fThawableSimpleBiDigraph$fMGraphMSimpleBiDigraph$fNFDataSimpleBiDigraph VertexMapRef VertexMapemptyVertexMapvertexForLabellookupVertexForLabelvertexMapFromGraphvertexMapFromRefnewVertexMapRefvertexForLabelRef$fNFDataVertexMap LabeledGraph LabeledMGraphnewLabeledGraphnewSizedLabeledGraph mapEdgeLabelmapVertexLabelfromLabeledEdgeListVertexLabeledGraphVertexLabeledMGraphnewVertexLabeledGraphnewSizedVertexLabeledGraph fromEdgeList$fMAddEdgeVertexLabeledMGraph#$fMBidirectionalVertexLabeledMGraph#$fMLabeledVertexVertexLabeledMGraph$fMGraphVertexLabeledMGraph"$fHasVertexLabelVertexLabeledGraph!$fBidirectionalVertexLabeledGraph$fThawableVertexLabeledGraph$fGraphVertexLabeledGraph$fNFDataVertexLabeledGraphEdgeLabeledGraphEdgeLabeledMGraphnewEdgeLabeledGraphnewSizedEdgeLabeledGraph$fMLabeledEdgeEdgeLabeledMGraph$fMAddVertexEdgeLabeledMGraph!$fMBidirectionalEdgeLabeledMGraph$fMGraphEdgeLabeledMGraph$fHasEdgeLabelEdgeLabeledGraph($fBidirectionalEdgeLabelEdgeLabeledGraph$fBidirectionalEdgeLabeledGraph$fThawableEdgeLabeledGraph$fGraphEdgeLabeledGraph$fNFDataEdgeLabeledGraphxdfsWithdfsWithdfsrdfsWithrdfsudfsWithudfsxdffWithdffWithdffrdffWithrdffudffWithudff components noComponents isConnectedtopsortscc reachableimmediateDominators dominatorsVEedgeIdbase GHC.MaybeNothing findEdgesensureNodeSpaceensureEdgeSpace newBitSetBitSetsetBittestBitLGrawGraphnodeLabelStoreedgeLabelStoreLMG rawMGraphnodeLabelStorageedgeLabelStorageensureEdgeLabelStorageensureNodeLabelStorage