MyNixOS website logo
Description

A graph library offering mutable, immutable, and inductive graphs.

This library provides mutable (in ST or IO), immutable, and inductive graphs. There are multiple graphs implementations provided to support different use cases and time/space tradeoffs. It is a design goal of haggle to be flexible and allow users to "pay as they go". Node and edge labels are optional. Haggle also aims to be safer than fgl: there are no partial functions in the API.

Overview

Github Actions status

Haggle is a graph library for Haskell. It aims to support large graphs efficiently and compactly. It differs from fgl in a few ways:

  • There are no partial functions in the API
  • There are multiple graph representations included
  • Mutable graphs can be constructed in IO or ST
  • Labels for both nodes and edges are optional

The API is based on typeclasses to allow programs to be written generically and support multiple graph representations when possible. Graphs can be mutable, immutable, or inductive.

The mutable graph support is designed to allow graphs to be efficiently constructed in a mutable context and then frozen into a pure immutable form. There are multiple representations of mutable and immutable graphs to support different use cases (simple graphs, directed graphs, and bidirectional directed graphs). The different representations allow users to make decisions on time and space tradeoffs based on their algorithmic needs.

Inductive graphs (the fgl style) are also supported, while sharing some of the API with the compact immutable graphs.

See the haddocks in Data.Graph.Haggle for information and examples on using the API.

TODO

  • Reach feature parity with the algorithms in fgl
  • Explore more graph representations
  • Explore graph serialization (the use of the opaque Vertex type makes it a bit tricky)
Metadata

Version

0.3

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows