Skip to content
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

Improve error message for incorrectTensorLength test #863

Open
MatthewDaggitt opened this issue Nov 26, 2024 · 0 comments
Open

Improve error message for incorrectTensorLength test #863

MatthewDaggitt opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working error-messages

Comments

@MatthewDaggitt
Copy link
Collaborator

Test:

tensor : Vector Nat 2
tensor = [1]

We should be able to come up with a much better message than the current:

Error in file 'incorrectTensorLength.vcl' at Line 2, Columns 10-11: unable to work out a valid type for the overloaded expression '[1]'.
          Type checking has deduced that it is of type:
            forallT {A} . Vector A 1 -> ?4 A
          but '[1]' has only the following valid types:
            forallT {A} . Vector A n -> List A
            forallT {A} . Vector A n -> (\ A -> Vector A n) A
@MatthewDaggitt MatthewDaggitt added bug Something isn't working error-messages labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error-messages
Projects
None yet
Development

No branches or pull requests

1 participant