Do not filter implicit args in internal to core translation #1728
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The internal to core translation was removing implicit arguments from function definitions and applications. This is incorrect as the implicit bindings are required when translating the following (in
csuc
, the binding of the implicit argument is required in an application on the rhs):Apart from removing this filter from function and application translation, this required the following changes:
ConstructorInfo:
The _constructorArgsNum field must include the number of type parameters of its inductive type.
PatternConstructorApp:
The pattern arguments must include wildcards for the implicit type parameters passed to the constructor.
BuiltinIf:
The BuiltinIf expression is passed an implicit type argument that must be removed when translating to Core if.
LitString:
A literal string is a function with an implcit type argument. So this must be a translated to a lambda where the type argument is ignored.