Skip to content
This repository was archived by the owner on Nov 3, 2020. It is now read-only.
This repository was archived by the owner on Nov 3, 2020. It is now read-only.

Implement better diagnostics #17

Open

Description

@darkf

Currently if some mundane error happens, such as a pattern failure, you get a cryptic and unlocalized error such as argument 1 doesn't satisfy any patterns.

Ideally these errors would contain with them the module and line number the error occurred in. This will require tracking the line number associated with AST nodes.

It might also be a good idea to pretty-print functions, so that we can do:

argument 1 doesn't satisfy any patterns in the function `f() -> 1.`

If the function body is too long, it will be truncated, such as:

argument 1 doesn't satisfy any patterns in the function `f() -> if true then if true then ... else (,) else (,).`

or:

argument 1 doesn't satisfy any patterns in the function `f() -> x + y + z ....`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions