FSharp.Core


ExprShape Module

Active patterns for traversing, visiting, rebuilding and transforming expressions in a generic way

Functions and values

Function or value Description

RebuildShapeCombination (shape, arguments)

Full Usage: RebuildShapeCombination (shape, arguments)

Parameters:
    shape : obj - The input shape.
    arguments : Expr list - The list of arguments.

Returns: Expr The rebuilt expression.

Re-build combination expressions. The first parameter should be an object returned by the ShapeCombination case of the active pattern in this module.

shape : obj

The input shape.

arguments : Expr list

The list of arguments.

Returns: Expr

The rebuilt expression.

Active patterns

Active pattern Description

(|ShapeVar|ShapeLambda|ShapeCombination|) input

Full Usage: (|ShapeVar|ShapeLambda|ShapeCombination|) input

Parameters:
    input : Expr - The input expression.

Returns: Choice<Var, (Var * Expr), (obj * Expr list)> The decomposed Var, Lambda, or ConstApp.

An active pattern that performs a complete decomposition viewing the expression tree as a binding structure

input : Expr

The input expression.

Returns: Choice<Var, (Var * Expr), (obj * Expr list)>

The decomposed Var, Lambda, or ConstApp.