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

if a sum type is in a bigger sum, then its summands are in that bigger sum too #27

Open
tscholak opened this issue Jan 28, 2019 · 1 comment

Comments

@tscholak
Copy link

it would be great if compdata was providing these instances:

instance (f :+: g) :<: h => f :<: h where ...

instance (f :+: g) :<: h => g :<: h where ...

I would do it downstream, but :<: is a type alias for (Subsume (ComprEmb (Elem f g)) f g), and ComprEmb (from SubsumeCommon) is not exported.

@pa-ba
Copy link
Owner

pa-ba commented Feb 18, 2019

Perhaps I am missing something, but I don't see how to implement this easily. The naive way would require adding two instance declarations for Subsume (corresponding to the two instance declarations you list) that are are overlapping and could lead to non-terminating type checking.

Do you have an implementation in mind?

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