Algebraic graphs
Alga is a Haskell library for algebraic construction and manipulation of graphs, enabling safe and powerful graph operations through an algebraic interface based on semiring-like laws. The library represents graphs using a data type with constructors for empty graphs, single vertices, overlay (union), and connect operations, allowing both unlabelled directed graphs and variants such as edge-labelled or non-empty graphs. Built on algebraic semantics rather than imperative algorithms, Alga can handle graphs with millions of vertices and billions of edges efficiently enough for many practical applications. The project, developed by Andrey Mokhov and documented through academic papers, blog posts, and talks, has also been implemented in other languages including Agda, F#, Scala, and TypeScript.