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

Arity check types and functions (->) #2049

Merged
merged 2 commits into from May 10, 2023
Merged

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented May 4, 2023

This pr fixes the following:

This example causes the compiler to crash with "implicitness mismatch".

f : id Bool -> Bool;
f _ := false;

The reason is that id expects an implicit argument but finds Bool, which is explicit. The arity checker was not inserting any hole because it was ignoring the whole type. Moreover the aritychecker was never checking -> types as we never expected to
have to insert holes in -> types (since the only fragment of defined functions that we accept in types are those which do not have implicit arguments).

We now properly arity check all types and process the function type -> correctly.

@janmasrovira janmasrovira added this to the 0.3.3 milestone May 4, 2023
@janmasrovira janmasrovira self-assigned this May 4, 2023
@janmasrovira janmasrovira marked this pull request as ready for review May 4, 2023 21:55
@jonaprieto jonaprieto modified the milestones: 0.3.3 , 0.3.4 May 8, 2023
@janmasrovira janmasrovira force-pushed the fix-arity-checking-functions branch from e55357e to cf1275e Compare May 8, 2023 21:50
@paulcadman paulcadman force-pushed the fix-arity-checking-functions branch from e963acd to 4e5f5e1 Compare May 10, 2023 11:17
@paulcadman paulcadman merged commit 9a64184 into main May 10, 2023
4 checks passed
@paulcadman paulcadman deleted the fix-arity-checking-functions branch May 10, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants