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

Use unnamed Pi type argument #2640

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

Conversation

felixspringernatuvion
Copy link

I noticed that the FromDhall and ToDhall instance of Fix don't use the exact same definition of the type. Sure they are judgementally equal, but why not make them syntactically equal aswell?

In particular the use of the named argument in the pi type "Make" is not the same. I personally think the best solution is to remove the name of this function, because Make is not used in the return type of the pi type anyways. This is what I'm doing in this commit.


Alternatively you could also change the "_" to "Make" here:

declared = Pi Nothing "result" (Const Core.Type) $ Pi Nothing "_" makeType "result"

That way both types would include the name Make.

Now the `FromDhall` and `ToDhall` instances both use unnamed arguments
in their type signature.

The value of this type is not used on type level so it is not necessary
to bring it into scope here.

On the value level this obviously is still necessary but that part is
untouched regarding this commit.
@felixspringernatuvion felixspringernatuvion changed the title Use unnamed Pi type argument. Use unnamed Pi type argument Feb 11, 2025
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