Skip to content

Instantly share code, notes, and snippets.

@laughedelic
Created September 5, 2014 15:49
Show Gist options
  • Save laughedelic/ab5efe5adac031af9c4a to your computer and use it in GitHub Desktop.
Save laughedelic/ab5efe5adac031af9c4a to your computer and use it in GitHub Desktop.
This is kind of a minimal example of the tags failure. Works with the commented variation.
import ohnosequences.pointless._, AnyTaggedType._
trait AnyAct {
type Itm <: AnyTaggedType
val itm: Itm
// type Out[I <: Itm] = Tagged[I]
type Out = Tagged[Itm]
}
trait AnyExec {
type Act <: AnyAct
// type O <: Act#Out[Act#Itm]
type O = Act#Out
def apply: O
}
class FooExec[F <: AnyAct](act: F)(result: F#Itm#Raw)
extends AnyExec {
type Act = F
// type O = Tagged[F#Itm]
def apply: O =
// act.itm =>> result
(act.itm: F#Itm) =>> result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment