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 a <= Max x (Max a y) #37

Open
isovector opened this issue Jul 12, 2021 · 2 comments
Open

Derive a <= Max x (Max a y) #37

isovector opened this issue Jul 12, 2021 · 2 comments

Comments

@isovector
Copy link

isovector commented Jul 12, 2021

ghc-typelits-extra doesn't take advantage of the semilattice on max. But this is a strange state of affairs, since the following reduces correctly:

a <= Max a (Max x y)

@martijnbastiaan
Copy link
Member

I believe that's hardcoded here:

(p, Max x y)
| b && (p == x || p == y) -> simples (((,) <$> evMagic ct <*> pure ct):evs) news eqs'

@christiaanb
Copy link
Member

christiaanb commented Jul 12, 2021

No, that indeed observes: x <= Max x y and y <= Max x y.

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

3 participants