We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
interface Iface where foo x y
Parsing error
This code produces empty interface:
Main> :doc Iface interface Main.Iface : Type
The text was updated successfully, but these errors were encountered:
foo x y may be parsed as a forward declaration of an implementation of an interface foo:
foo x y
foo
interface foo (0 a, b : Type) where foo x y
works.
But it still seems to not to make sense in interface declarations.
Interestingly, we can have data forward declaration in interfaces, but they behave as a usual functions:
data
interface X (0 x, y : Type) where %inline foo x y -- ignored data Y : Type X Nat Nat where Y = Nat
If we try to add a data declaration according to the forward declaration in the interface, we get a strange error:
failing "Missing methods in X: Y" X String String where data Y : Type where MkY : Y
But if we add another declaration for Y, we can see that "missing methods" checks earlier than "can only contain definitions":
Y
failing "Implementation body can only contain definitions" X String String where Y = Nat data Y : Type where MkY : Y
Sorry, something went wrong.
No branches or pull requests
Steps to Reproduce
Expected Behavior
Parsing error
Observed Behavior
This code produces empty interface:
The text was updated successfully, but these errors were encountered: