I think that this is how it is done in documentation BTW, so you might want to update docs to reflect incompatibilites between 0.4.1 and 0.4.3 (unless I'm doing something wrong).
Under 0.4.1 this code compiles fine:
import cats.free.Free
import freek._
sealed trait DSL[R]
case class Get(key: String) extends DSL[Option[Int]]
case class Put(key: String, value: Int) extends DSL[Int]
sealed trait Event[A]
case class GetSucceeded(key: String, found: Int) extends Event[Unit]
case class GetFailed(key: String) extends Event[Unit]
type Program = DSL :|: Event :|: FXNil
type Action[A] = Free[Program#Cop, A]
def get(key: String): Action[Option[Int]] = Get(key).freek[Program]
Under 0.4.3 the same code does not compile with error
Error:(15, 60) polymorphic expression cannot be instantiated to expected type;
found : [A]cats.free.Free[subfx.Cop,Option[Int]]
required: A$A34.this.Action[Option[Int]]
(which expands to) cats.free.Free[[t]freek.ConsK[A$A34.this.DSL,[t]freek.ConsK[A$A34.this.Event,[t]freek.CNilK[t],t],t],Option[Int]]
def get(key: String): Action[Option[Int]] = Get(key).freek[Program]
^
I think that this is how it is done in documentation BTW, so you might want to update docs to reflect incompatibilites between 0.4.1 and 0.4.3 (unless I'm doing something wrong).
Under 0.4.1 this code compiles fine:
Under 0.4.3 the same code does not compile with error