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 a data-type mechanism, desugaring to a Church-encoding #7

Open
meisl opened this issue Oct 21, 2014 · 0 comments
Open

add a data-type mechanism, desugaring to a Church-encoding #7

meisl opened this issue Oct 21, 2014 · 0 comments

Comments

@meisl
Copy link
Owner

meisl commented Oct 21, 2014

Consider using bit-strings (List Bool) for the type/ctor-tag. This would require to re-do ADT List with at least three-way mutual recursion (-> #33), but has the benefit of greatly simplifying the task of adding more ctors to an ADT.
It'd also open up an easy way of adding support for (runtime) type tags as well: instead a flat List Bool we'd use a List (List Bool), one determining the runtime type, another determining the ctor used, ....
We might even provide the actual fields of the ADT instance in a List (rather than as top-level args), thus making the interface for both, predicates and projections completely uniform.

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

1 participant