Skip to main content

parse_definition

Function parse_definition 

Source
pub fn parse_definition(input: &str) -> Result<(Command, usize), ParseError>
Expand description

Parse “## To [name] (params) -> RetType:” into Command::Definition

Handles implicit fixpoints: if the function name appears in the body, the body is automatically wrapped in Term::Fix.

This door reads TEXT ALONE, so a Consider block is limited to what text can carry: one column, one case per clause, in SOURCE order, with flat identifier binders. Use parse_definition_in wherever a context exists — it compiles the equation set instead.