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

Add examples from OOPSLA-2022 artifact as tests #386

Merged
merged 6 commits into from
Feb 13, 2024
Merged

Conversation

dvdvgt
Copy link
Collaborator

@dvdvgt dvdvgt commented Feb 2, 2024

Description

Closes #63 by porting the examples from the artifact and adding them as tests. I also had a look at the case studies listed there, but it seems there are already tests that closely resemble them.

Since some examples were using the timestamp function and this is of course inherently impossible to test, I instead used a dummy counter instead.

@dvdvgt
Copy link
Collaborator Author

dvdvgt commented Feb 3, 2024

Are these tests failing because of the usage of unsupported features of the respective backend, or rather are actually bugs?

@b-studios
Copy link
Collaborator

b-studios commented Feb 3, 2024

Thanks for testing -- these are all expected:

Rank-2 not supported in ML

This is why this error shows up:

-[error] examples/pos/global_capabilities.effekt:74:35: Cannot typecheck call.
-There are multiple overloads, which all fail to check:
-
-Possible overload: effekt.println$4 of type String => Unit
-  Wrong number of type arguments 1
-
-Possible overload: effekt.println of type Int => Unit
-  Wrong number of type arguments 1
-
-Possible overload: effekt.println$2 of type Double => Unit
-  Wrong number of type arguments 1
-
-Possible overload: effekt.println$1 of type Unit => Unit
-  Wrong number of type arguments 1
-
-Possible overload: effekt.println$3 of type Boolean => Unit
-  Wrong number of type arguments 1
-
-        def myprintln[A](msg) = { println[A](msg); resume(()) }
-                                  ^^^^^^^^^^^^^^^
+Hello!
+Hello!
...

The ML backend needs to have monomorphic definitions of println. You could define it at String and then use the specific show function (on int for example).

Boxing (especially non-empty captures) not supported in lift-based implementations (Chez lift, ML, and LLVM)

  • boxing in this test is not expected to work.

@dvdvgt dvdvgt requested a review from b-studios February 5, 2024 18:04
@b-studios b-studios merged commit 5379f6b into master Feb 13, 2024
1 check passed
@b-studios b-studios deleted the feature/issue63 branch February 13, 2024 16:38
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.

Integrate System C into Effekt
2 participants