hakyll-3.2.7.1: A static website compiler library

Safe HaskellSafe-Infered

Hakyll.Core.DirectedGraph

Description

Representation of a directed graph. In Hakyll, this is used for dependency tracking.

Synopsis

Documentation

data DirectedGraph a Source

Type used to represent a directed graph

Instances

Typeable1 DirectedGraph 
Show a => Show (DirectedGraph a) 
Ord a => Monoid (DirectedGraph a)

Allow users to concatenate different graphs

(Ord a, Binary a) => Binary (DirectedGraph a) 

fromListSource

Arguments

:: Ord a 
=> [(a, Set a)]

List of (node, reachable neighbours)

-> DirectedGraph a

Resulting directed graph

Construction of directed graphs

toList :: DirectedGraph a -> [(a, Set a)]Source

Deconstruction of directed graphs

memberSource

Arguments

:: Ord a 
=> a

Node to check for

-> DirectedGraph a

Directed graph to check in

-> Bool

If the node lies in the graph

Check if a node lies in the given graph

nodesSource

Arguments

:: Ord a 
=> DirectedGraph a

Graph to get the nodes from

-> Set a

All nodes in the graph

Get all nodes in the graph

neighboursSource

Arguments

:: Ord a 
=> a

Node to get the neighbours of

-> DirectedGraph a

Graph to search in

-> Set a

Set containing the neighbours

Get a set of reachable neighbours from a directed graph

reverse :: Ord a => DirectedGraph a -> DirectedGraph aSource

Reverse a directed graph (i.e. flip all edges)

reachableNodes :: Ord a => Set a -> DirectedGraph a -> Set aSource

Find all reachable nodes from a given set of nodes in the directed graph