Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
module type Node = sig ... end
module Edge : sig ... end
val sort :
?verbose:Topological_sort__.Import.Bool.t ->
(module Node with type t = 'node) ->
'node Topological_sort__.Import.List.t ->
'node Edge.t Topological_sort__.Import.List.t ->
'node Topological_sort__.Import.List.t Topological_sort__.Import.Or_error.t
sort (module Node) nodes edges
returns a list of nodes output
satisfying:
nodes
or edges
occurs once in output
.{ from; to_ }
is in edges
, then from
occurs before to_
in output
.output
.sort
returns Error
if there is a cycle.