Skip to main content

Module graph_classifier

Module graph_classifier 

Source
Expand description

Graph classifier — structural classification of Pattern<V> values.

Ported from Pattern.Graph.GraphClassifier in the Haskell reference implementation.

Structs§

GraphClassifier
Injectable classification strategy wrapping a boxed closure.

Enums§

GraphClass
The five structural categories a pattern can belong to.

Traits§

GraphValue
Value types that can be used with GraphClassifier and PatternGraph.

Functions§

canonical_classifier
Returns the standard shape-based classifier.
classify_by_shape
Classifies a pattern by its structural shape.
from_test_node
Wraps a node predicate into a two-category classifier (GNode vs GOther(())).