-
Notifications
You must be signed in to change notification settings - Fork 644
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
Types appear to match but fail #4877
Comments
Interfaces have names, would that be related? |
The key question here, is what are the colour of the things Idris is complaining about! Idris' supports semantic highlighting and tells us about what things are! If you look at the error message for line 18, Idris does explicitly give a hint to what is going on here. But first check the colour's in Idris' output. |
Ahhhh Thank you so much! I am getting non-italic purple vs non-italic green; so its a variable against a function according to the link. Guess I must have have named an implicit function with that variable name or something |
essentially, at the type-level names that are not capitalised are treated (greedily) as implicit arguments.
There are two approaches, in Idris1 either you ensure the thing in the type is capitalised, or that the thing is suitably qualified. PS
I've been using Idris for a while, and the colouring still sometimes escapes me! We should really be a bit better with the annotations here as some people might not be readily aware of semantic highlighting (nor what the highlighting is supposed to represent). PRs on Idris1 and Idris2 are welcome ;-) |
minimal code for replication:
Error that is produced:
Idris2 states:
At face value this appears to be a bug since of course f x id_elm is the same as f x id_elm . However, I feel like there is some kinks and quirks about interfaces in Idris that might be producing this error. Not sure where to go from here
The text was updated successfully, but these errors were encountered: