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

Derive instances for Existentials #80

Open
jakzale opened this issue Aug 4, 2020 · 0 comments
Open

Derive instances for Existentials #80

jakzale opened this issue Aug 4, 2020 · 0 comments

Comments

@jakzale
Copy link
Collaborator

jakzale commented Aug 4, 2020

See #79.

Ord and Eq instances for Some... could be automatically derived.

And we could use the some package for Existential.hs.

instance Eq (SomeUni f) where
    Some u1 == Some u2 = withGeqUni u1 u2 False True

instance Ord (SomeUni f) where
 Some (UniConst Vector v1) == Some (UniConst Vector v2) = v1 == v2
 Some (UniConst Bool _)    == _                         = False
 Some (UniConst Field _)   == _                         = False
 Some (UniConst Vector _)  == _                         = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants