Skip to content
This repository has been archived by the owner on May 20, 2018. It is now read-only.

Represent typechecking errors as annotated terms #171

Open
robrix opened this issue Dec 6, 2015 · 2 comments
Open

Represent typechecking errors as annotated terms #171

robrix opened this issue Dec 6, 2015 · 2 comments
Labels

Comments

@robrix
Copy link
Contributor

robrix commented Dec 6, 2015

Annotating terms with typechecking errors in the failure case yields a tree describing the failure with precise reference to the nodes in error.

This can also be driven interactively as a means of refining ill-typed into well-typed terms.

@robrix
Copy link
Contributor Author

robrix commented Dec 6, 2015

We could represent this with AnnotatedTerm<Either<Error, Term>> or something more like Free<Expression<Free>, Error> (PartialTerm might be a better name than Free, by analogy with AnnotatedTerm vs. Cofree).

@robrix
Copy link
Contributor Author

robrix commented Dec 12, 2015

PartialTerm would best represent cases where some subtree is ill-typed. That might preclude the discovery of well-typed sub-subtrees.

AnnotatedTerm would allow us to express this better, at the expense of having to traverse the entire thing to discover the errors.

@robrix robrix added the feature label Dec 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant