Skip to content

Instantly share code, notes, and snippets.

Created January 8, 2013 22:43
Show Gist options
  • Save anonymous/4488714 to your computer and use it in GitHub Desktop.
Save anonymous/4488714 to your computer and use it in GitHub Desktop.
// does this work out?
trait Txn[S <: Sys] {
def newVar[A](init: A): S#Vr[A]
}
trait Var[Tx, A] {
def get(implicit tx: Tx): A
def set(value: A)(implicit tx: Tx): Unit
}
trait Sys {
type S = this.type // ! yes ??
type Tx <: Txn[S]
type Vr[A] <: Var[S#Tx, A]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment