-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression in exhausitivity of HK types
- Loading branch information
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// scalac: -Werror | ||
trait Foo: | ||
type Bar[_] | ||
|
||
object Foo: | ||
type Aux[B[_]] = Foo { type Bar[A] = B[A] } | ||
|
||
class Test: | ||
def t1[B[_]](self: Option[Foo.Aux[B]]) = self match | ||
case Some(_) => 1 | ||
case None => 2 | ||
|
||
def t2[B[_]](self: Option[Foo.Aux[B]]) = self match | ||
case Some(f) => 1 | ||
case None => 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// scalac: -Werror | ||
import scala.util.* | ||
|
||
trait Transaction { | ||
type State[_] | ||
} | ||
object Transaction { | ||
type of[S[_]] = Transaction { type State[A] = S[A] } | ||
} | ||
trait DynamicScope[State[_]] | ||
|
||
case class ScopeSearch[State[_]](self: Either[Transaction.of[State], DynamicScope[State]]) { | ||
|
||
def embedTransaction[T](f: Transaction.of[State] => T): T = | ||
self match { | ||
case Left(integrated) => ??? | ||
case Right(ds) => ??? | ||
} | ||
} | ||
|