HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Modulealgebraic-graphs-0.8Haskell2010

Algebra.Graph.Labelled.Example.Network

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 contains a simple example of using edge-labelled graphs defined in the module Algebra.Graph.Labelled for working with networks, i.e. graphs whose edges are labelled with distances.

Synopsis
datadata City

Our example networks have cities as vertices.

Instances5Bounded, Enum, Eq, Ord, Show
  • Bounded CityDefined in algebraic-graphs-0.8 · Algebra.Graph.Labelled.Example.Network
  • Enum CityDefined in algebraic-graphs-0.8 · Algebra.Graph.Labelled.Example.Network
  • Eq CityDefined in algebraic-graphs-0.8 · Algebra.Graph.Labelled.Example.Network
  • Ord CityDefined in algebraic-graphs-0.8 · Algebra.Graph.Labelled.Example.Network
  • Show CityDefined in algebraic-graphs-0.8 · Algebra.Graph.Labelled.Example.Network
typetype JourneyTime = Int

For simplicity we measure journey times in integer number of minutes.