Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
aeson-schemas Data.Aeson.Schema.Internal Convert an Object into a Object, losing the type information in the schema.
-
aeson-schemas Data.Aeson.Schema.Internal No documentation available.
type
IsSchemaObjectMap (pairs :: SchemaObjectMap) = All IsSchemaObjectPair pairsaeson-schemas Data.Aeson.Schema.Type No documentation available.
type
SchemaObjectMapV = SchemaObjectMap' String NameLikeaeson-schemas Data.Aeson.Schema.Type No documentation available.
-
aeson-schemas Data.Aeson.Schema.Utils.Compat A map from JSON key type Key to v.
module Algebra.Graph.Acyclic.
AdjacencyMap Alga is a library for algebraic construction and manipulation of graphs in Haskell. See this paper for the motivation behind the library, the underlying theory, and implementation details. This module defines the AdjacencyMap data type and for acyclic graphs, as well as associated operations and algorithms. To avoid name clashes with Algebra.Graph.AdjacencyMap, this module can be imported qualified:
import qualified Algebra.Graph.Acyclic.AdjacencyMap as Acyclic
-
algebraic-graphs Algebra.Graph.Acyclic.AdjacencyMap The AdjacencyMap data type represents an acyclic graph by a map of vertices to their adjacency sets. Although the internal representation allows for cycles, the methods provided by this module cannot be used to construct a graph with cycles. The Show instance is defined using basic graph construction primitives where possible, falling back to toAcyclic and Algebra.Graph.AdjacencyMap otherwise:
show empty == "empty" show (shrink 1) == "vertex 1" show (shrink $ 1 + 2) == "vertices [1,2]" show (shrink $ 1 * 2) == "(fromJust . toAcyclic) (edge 1 2)" show (shrink $ 1 * 2 * 3) == "(fromJust . toAcyclic) (edges [(1,2),(1,3),(2,3)])" show (shrink $ 1 * 2 + 3) == "(fromJust . toAcyclic) (overlay (vertex 3) (edge 1 2))"
The total order on graphs is defined using size-lexicographic comparison:- Compare the number of vertices. In case of a tie, continue.
- Compare the sets of vertices. In case of a tie, continue.
- Compare the number of edges. In case of a tie, continue.
- Compare the sets of edges.
isSubgraphOf x y ==> x <= y
module Algebra.Graph.
AdjacencyIntMap Alga is a library for algebraic construction and manipulation of graphs in Haskell. See this paper for the motivation behind the library, the underlying theory, and implementation details. This module defines the AdjacencyIntMap data type and associated functions. See Algebra.Graph.AdjacencyIntMap.Algorithm for implementations of basic graph algorithms. AdjacencyIntMap is an instance of the Graph type class, which can be used for polymorphic graph construction and manipulation. See Algebra.Graph.AdjacencyMap for graphs with non-Int vertices.
-
algebraic-graphs Algebra.Graph.AdjacencyIntMap The AdjacencyIntMap data type represents a graph by a map of vertices to their adjacency sets. We define a Num instance as a convenient notation for working with graphs:
0 == vertex 0 1 + 2 == overlay (vertex 1) (vertex 2) 1 * 2 == connect (vertex 1) (vertex 2) 1 + 2 * 3 == overlay (vertex 1) (connect (vertex 2) (vertex 3)) 1 * (2 + 3) == connect (vertex 1) (overlay (vertex 2) (vertex 3))
Note: the Num instance does not satisfy several "customary laws" of Num, which dictate that fromInteger 0 and fromInteger 1 should act as additive and multiplicative identities, and negate as additive inverse. Nevertheless, overloading fromInteger, + and * is very convenient when working with algebraic graphs; we hope that in future Haskell's Prelude will provide a more fine-grained class hierarchy for algebraic structures, which we would be able to utilise without violating any laws. The Show instance is defined using basic graph construction primitives:show (empty :: AdjacencyIntMap Int) == "empty" show (1 :: AdjacencyIntMap Int) == "vertex 1" show (1 + 2 :: AdjacencyIntMap Int) == "vertices [1,2]" show (1 * 2 :: AdjacencyIntMap Int) == "edge 1 2" show (1 * 2 * 3 :: AdjacencyIntMap Int) == "edges [(1,2),(1,3),(2,3)]" show (1 * 2 + 3 :: AdjacencyIntMap Int) == "overlay (vertex 3) (edge 1 2)"
The Eq instance satisfies all axioms of algebraic graphs:- overlay is commutative and associative:
x + y == y + x x + (y + z) == (x + y) + z
- connect is associative and has empty as the
identity:
x * empty == x empty * x == x x * (y * z) == (x * y) * z
- connect distributes over overlay:
x * (y + z) == x * y + x * z (x + y) * z == x * z + y * z
- connect can be decomposed:
x * y * z == x * y + x * z + y * z
- overlay has empty as the identity and is
idempotent:
x + empty == x empty + x == x x + x == x
- Absorption and saturation of connect:
x * y + x + y == x * y x * x * x == x * x
- Compare the number of vertices. In case of a tie, continue.
- Compare the sets of vertices. In case of a tie, continue.
- Compare the number of edges. In case of a tie, continue.
- Compare the sets of edges.
vertex 1 < vertex 2 vertex 3 < edge 1 2 vertex 1 < edge 1 1 edge 1 1 < edge 1 2 edge 1 2 < edge 1 1 + edge 2 2 edge 1 2 < edge 1 3
Note that the resulting order refines the isSubgraphOf relation and is compatible with overlay and connect operations:isSubgraphOf x y ==> x <= y
empty <= x x <= x + y x + y <= x * y
- overlay is commutative and associative:
adjacencyIntMap :: AdjacencyIntMap -> IntMap IntSetalgebraic-graphs Algebra.Graph.AdjacencyIntMap The adjacency map of a graph: each vertex is associated with a set of its direct successors. Complexity: O(1) time and memory.
adjacencyIntMap empty == IntMap.empty adjacencyIntMap (vertex x) == IntMap.singleton x IntSet.empty adjacencyIntMap (edge 1 1) == IntMap.singleton 1 (IntSet.singleton 1) adjacencyIntMap (edge 1 2) == IntMap.fromList [(1,IntSet.singleton 2), (2,IntSet.empty)]