Skip to content

remove unused constructors for error messages #2657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

winitzki
Copy link
Collaborator

@winitzki winitzki commented Jun 21, 2025

While working on #2651 I noticed that several error message constructors were not used to create any error messages in the type-checker. Those constructors are:

  • InvalidHandlerOutputType
  • InvalidListElement
  • MustUpdateARecord
  • RecordTypeMismatch

In all those cases, the error description shows some example errors but those errors are reported via different error messages. There is no code anywhere in this repository that creates error values or raises exceptions using these constructors.

For example, it looks like InvalidListElement was intended to describe the type error in [1, True] : List Natural. However, Dhall reports the error "List elements should all have the same type" created via MismatchedListElements. The type error in [1, 2] : List Text is "Expression does not match type annotation".

I would like to remove all code around those unused error message constructors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant