Module Smyth.Pat

val syntactically_equal : Lang.pat -> Lang.pat -> bool

syntactically_equal p1 p2 determines if p1 and p2 have the same abstract syntax tree.

val bind_res : Lang.pat -> Lang.res -> Lang.env option

Performs pattern-matching to bind a pattern to a result.

val bind_rec_name_res : string option -> Lang.res -> Lang.env

Performs pattern-matching to bind a (possibly None) recursive function name to a result.

val bind_typ : Lang.bind_spec -> Lang.pat -> Lang.typ -> Lang.type_ctx option

Performs pattern-matching to bind a pattern to a type.

val bind_rec_name_typ : string option -> Lang.typ -> Lang.type_ctx

Performs pattern-matching to bind a (possibly None) recursive function name to a type.