Without all the associated machinery, we want something like this (but less hand-wavy):
sealed abstract class ABT[F[_], A]
final case class Var[F[_], A](v: String) extends ABT[F, A]
final case class Abs[F[_], A](v: String, term: F[A]) extends ABT[F, A]
type BoundExpr[F[_], A] = HCoproduct(ABT, Expr, F, A)
which relies on us having mutual recursion, but gives us multi-sorted ABTs pretty simply, I think.
Without all the associated machinery, we want something like this (but less hand-wavy):
which relies on us having mutual recursion, but gives us multi-sorted ABTs pretty simply, I think.