hydra-0.1.1: Type-aware transformations for data and programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Util.Sorting

Description

Utilities for sorting

Synopsis

Documentation

topologicalSort :: Eq a => [(a, [a])] -> Maybe [a] Source #

Sort a directed acyclic graph (DAG) based on an adjacency list Note: assumes that the input is in fact a DAG; the ordering is incomplete in the presence of cycles.