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

Partial type signatures #276

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b17c510
Creates test class for partial type signatures
MattisKra Jun 5, 2023
4972c33
Adds ValueTypeWildcard
MattisKra Jun 5, 2023
cade845
Fixes wildcard parsing
MattisKra Jun 6, 2023
373776d
Adds partial type signatures for value types
MattisKra Jun 6, 2023
52c6ca2
First work for BlockType Wildcards
MattisKra Jun 12, 2023
9fec468
Further changes for BlockType Wildcards
MattisKra Jun 26, 2023
758369c
BlockType Wildcards infer right type signature, not usable yet.
MattisKra Jun 26, 2023
12c290e
Adds small changes
MattisKra Jun 27, 2023
c418413
Add basic test infrastructure for checking inferred types
marzipankaiser Jun 29, 2023
8700f5f
Also allow file
marzipankaiser Jul 4, 2023
be638b5
Restores ConcreteEffects
MattisKra Jul 4, 2023
830ebf9
Merge branch 'feature/partial-type-signatures--test-infrastructure' i…
MattisKra Jul 4, 2023
70e3861
Adds wildcards for CaptureSets
MattisKra Jul 9, 2023
2cc55be
First work on capture test
MattisKra Jul 10, 2023
55e732c
Adds EffectWildcards
MattisKra Jul 21, 2023
9ef24df
Adds EffectWildcards to checkFunctionArgument
MattisKra Jul 22, 2023
5d9d96d
Replaces a few examples
MattisKra Jul 22, 2023
0e5c2ea
Fixes a few bugs
MattisKra Jul 25, 2023
293cb03
Reimplements EffectWildcards as EffectVar
MattisKra Jul 31, 2023
863afe9
Typer tests: Fallback to full symbol search in tree
marzipankaiser Aug 7, 2023
d714d11
Adds and modifies examples
MattisKra Aug 8, 2023
1b4adba
Prepares merge
MattisKra Aug 8, 2023
5ca489c
Adds some missing features and prepares merge
MattisKra Aug 30, 2023
4063ed1
Fixed two problems regarding block type wildcards
MattisKra Sep 7, 2023
7f8b7cf
Adds some test cases
MattisKra Sep 15, 2023
8976dd7
Improves examples
MattisKra Oct 18, 2023
c8acc66
Improves examples
MattisKra Oct 19, 2023
577f1a3
Improves examples
MattisKra Oct 19, 2023
1cadd98
Erroneous example found
MattisKra Oct 19, 2023
9073fa4
Minor code improvements
MattisKra Oct 19, 2023
eed336b
Merge branch 'master' into feature/partial-type-signatures
marzipankaiser Mar 22, 2024
34d9d66
Fix error messages
marzipankaiser Mar 22, 2024
0b8962a
Fix detection of partial effect signatures
marzipankaiser Mar 22, 2024
d564750
PTS: Ignore test that already failed initially
marzipankaiser Mar 22, 2024
f4529ab
Give up on boxInference test for partial type signatures for now
marzipankaiser Mar 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion effekt/jvm/src/main/scala/effekt/Server.scala
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ trait LSPServer extends kiama.util.Server[Tree, EffektConfig, EffektError] with
}
} yield res

def needsUpdate(annotated: (ValueType, Effects), inferred: (ValueType, Effects))(using Context): Boolean = {
def needsUpdate(annotated: (ValueType, EffectsOrRef), inferred: (ValueType, EffectsOrRef))(using Context): Boolean = {
val (tpe1, effs1) = annotated
val (tpe2, effs2) = inferred
tpe1 != tpe2 || effs1 != effs2
Expand Down
8 changes: 4 additions & 4 deletions effekt/jvm/src/test/scala/effekt/ConstraintTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class ConstraintTests extends munit.FunSuite {


def freshTypeVar(name: String) =
scope.fresh(TypeParam(Name.local(name)), NoSource)
scope.freshValueVar(Some(TypeParam(Name.local(name))), NoSource)

def freshCaptVar(name: String) =
scope.freshCaptVar(CaptUnificationVar.VariableInstantiation(CaptureParam(Name.local(name)), NoSource))
Expand Down Expand Up @@ -139,7 +139,7 @@ class TestSubstitutions extends ConstraintTests {
import graph.*

requireLower(Set(x), A)
leave(Nil, List(A))
leave(Nil, Nil, List(A), Nil)

assert(subst.isDefinedAt(A))
assert(subst.get(A) == Some(CaptureSet(x)))
Expand All @@ -150,7 +150,7 @@ class TestSubstitutions extends ConstraintTests {
import graph.*

requireLower(Set(x), A)
leave(Nil, List(A))
leave(Nil, Nil, List(A), Nil)

connect(A, B)
assert(B.lower == Some(Set(x)))
Expand Down Expand Up @@ -198,7 +198,7 @@ class TestSubtracting extends ConstraintTests {
import graph.*

requireLower(Set(x), A)
leave(Nil, List(A))
leave(Nil, Nil, List(A), Nil)

connect(A, B, Set(x))

Expand Down
18 changes: 18 additions & 0 deletions effekt/jvm/src/test/scala/effekt/PartialTypeSignatureTest.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package effekt

import java.io.File
import sbt.io.*
import sbt.io.syntax.*

import scala.language.implicitConversions

class PartialTypeSignatureTest extends EffektTests {
def backendName: String = "js"

override lazy val included: List[File] = List(
examplesDir / "pts/neg"
)

override lazy val ignored: List[File] = List(
)
}
Loading
Loading