ProjectSeptemberInc / freek

Freek, a freaky simple Free to combine your DSL seamlessly
Other
198 stars 19 forks source link

Compile error with SBT #31

Closed elongeau closed 7 years ago

elongeau commented 7 years ago

on my pet project I have a compilation error with SBT

the class

object Behavior {

  sealed trait Tasks[A]

  final case class StartDoing(description: String, project: String)
      extends Tasks[Todo]

  type PRG = Tasks :|: NilDSL
  val PRG = DSL.Make[PRG]

  def create(description: String): Free[PRG.Cop, Task] =
    for {
      todo <- StartDoing(description, "").freek[PRG]
    } yield todo

}
[error] /Users/emmanuellongeau/project/fun-todo/modules/core/src/main/scala/fr/elongeau/todo/Behavior.scala:22: could not find implicit value for parameter subdsl: freek.SubDSL1[fr.elongeau.todo.Behavior.Tasks,fr.elongeau.todo.Behavior.PRG]
[error]       todo <- StartDoing(description, "").freek[PRG]
[error]                                                ^
[error] one error found
[error] (core/compile:compileIncremental) Compilation failed
elongeau commented 7 years ago

finally make it work SBT compile and run but Intelli complains about compilation errors but can run program ...