HORIZON HASKELLDocslts/ghc-9.14.xd82dee82026-10-12Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · d82dee8 · 2026-10-12

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.

  • 2 types
  • 3 values
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.