Module z_toposort

Simple topological sort of tuples {item, [depends], [provides]}.

Copyright © 2011 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Simple topological sort of tuples {item, [depends], [provides]}

Data Types

cycles()

cycles() = [[name()]]

name()

name() = atom() | {atom(), term()}

topoitem()

topoitem() = {Name::name(), Depends::[atom()], Provides::[atom()]}

topoitems()

topoitems() = [topoitem()]

Function Index

sort/1Return the topological sort of a list of items.

Function Details

sort/1

sort(L::topoitems()) -> {ok, [name()]} | {error, {cyclic, cycles()}}

Return the topological sort of a list of items. Each item lists its provisions and dependencies.


Generated by EDoc