Skip to main content

sort_substitute

Function sort_substitute 

Source
pub unsafe extern "C" fn sort_substitute(
    sort: Sort,
    s: Sort,
    replacement: Sort,
) -> Sort
Expand description

Substitution of Sorts.

Note that this replacement is applied during a pre-order traversal and only once to the sort. It is not run until fix point.

For example, (Array A B).substitute({A, C}, {(Array C D), (Array A B)}) will return (Array (Array C D) B).

@warning This function is experimental and may change in future versions.

@param sort The sort. @param s The subsort to be substituted within the given sort. @param replacement The sort replacing the substituted subsort.