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

Recognize parallel datatypes with args type-level equality #97

Open
colin-mcd opened this issue Jun 27, 2019 · 1 comment
Open

Recognize parallel datatypes with args type-level equality #97

colin-mcd opened this issue Jun 27, 2019 · 1 comment
Assignees
Labels
proposal A feature / fix that requires some internal discussion.

Comments

@colin-mcd
Copy link
Contributor

Right now in our Agda implementation, we have a module parameter functor for the span monad, where we use the IO monad when we want to write to send progress updates to the front end, and the id monad when we simply want to check something and get a pure result. This works great, except for when we want to convert from a datatype from a module imported with IO to the same datatype from the same module, but this time imported with id. For example, Agda says that toplevel-state IO is distinct from toplevel-state id, even though the datatypes do not contain anything of type spanM [IO/id].

After having to deal with this annoyance, I think that it would be reasonable to implement a fix for this same problem in Cedille. We would need to check both if two datatypes are essentially the same—just with different constructor names—and also only check that arguments to the datatypes are the same if they occur free somewhere in the constructors (it could happen as well that they do occur free as arguments to some other datatype where they are irrelevant, though, so we'd want to check for this as well?)

@colin-mcd colin-mcd added the proposal A feature / fix that requires some internal discussion. label Jun 27, 2019
@colin-mcd colin-mcd self-assigned this Jun 27, 2019
@astump
Copy link
Contributor

astump commented Jul 1, 2019

In general, recognizing that two datatype declarations are the same (up to conversion), and then treating the actual datatypes (D1 and D2, say) as convertible.

Not quite sure, but could be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal A feature / fix that requires some internal discussion.
Projects
None yet
Development

No branches or pull requests

2 participants