Open
Description
I have looked at higherkindness.athema.Expr[V, A]
and it seems to provide type variable V for certain expressions.
I have an expression tree that I would like to define similar to above but what makes it unique is that there are at least five different base types if you will where expressions would require and only work with one of those base types. My thought was to define a type something like:
sealed trait Expr[A, B, C, D, E]
case class OpOnA[A, B, C, D, E](a: A) extends Expr[A, B, C, D, E]
case class CombineOnlyAsAndBs[A, B, C, D, E](a: A, b: B) extends Expr[A, B, C, D, E]
case class ConvertBToC[A, B, C, D, E](b: B, someValue: String) extends Expr[A, B, C, D, E]
case class RunC[A, B, C, D, E](c: C, time: Int) extends Expr[A, B, C, D, E]
...
Am I on the right track with the above? If so how do I use Fix with so many type parameters on Expr?
If not is there a more in depth example of droste that I can look at that has a similar constraint?
Metadata
Metadata
Assignees
Labels
No labels
Activity