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

Improve external def parsing #1188

Merged
merged 6 commits into from Mar 28, 2024
Merged

Conversation

johnynek
Copy link
Owner

@johnynek johnynek commented Mar 25, 2024

close #1170

This does a few things:

  1. allows external def to have type parameters. This allows setting the kinds on the type parameters other than kind *.
  2. error if the type parameters do not exactly match the free types in the external def.
  3. verify that the final type of the external def is well kinded. Previously, we just took parsed syntax and accepted whatever was claimed, but that allowed to make values of the wrong kind.

@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 96.07843% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 91.49%. Comparing base (04a0e87) to head (20ce57e).
Report is 20 commits behind head on main.

❗ Current head 20ce57e differs from pull request most recent head 01f3832. Consider uploading reports for the commit 01f3832 to get more accurate results

Files Patch % Lines
.../main/scala/org/bykn/bosatsu/SourceConverter.scala 96.42% 1 Missing ⚠️
...re/src/main/scala/org/bykn/bosatsu/Statement.scala 90.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1188      +/-   ##
==========================================
+ Coverage   91.32%   91.49%   +0.17%     
==========================================
  Files          96       96              
  Lines       11846    12047     +201     
  Branches     2675     2763      +88     
==========================================
+ Hits        10818    11023     +205     
+ Misses       1028     1024       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@johnynek johnynek changed the title WIP: Improve external def parsing Improve external def parsing Mar 27, 2024
@johnynek johnynek merged commit 18efb84 into main Mar 28, 2024
7 checks passed
@johnynek johnynek deleted the oscar/20240324_external_def_parsing_1170 branch March 28, 2024 05:29
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.

parsing external def doesn't allow using explicit type parameters
2 participants