Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recursion-scheme-friendly ABTs #48

Open
sellout opened this issue Dec 6, 2016 · 2 comments
Open

Add recursion-scheme-friendly ABTs #48

sellout opened this issue Dec 6, 2016 · 2 comments

Comments

@sellout
Copy link
Contributor

sellout commented Dec 6, 2016

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.

@jdegoes
Copy link
Contributor

jdegoes commented Dec 7, 2016

And maybe with a module-level existential encoding of v so users cannot synthesize their own variable identifiers out of thin air.

@sellout
Copy link
Contributor Author

sellout commented Dec 7, 2016

Yeah, I actually had a different encoding of vars, but thought it cluttered up the hand-waving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants