ghc icon indicating copy to clipboard operation
ghc copied to clipboard

Use reduceTyFamApp_maybe in Lint

Open monoidal opened this issue 5 years ago • 3 comments

Currently Core Lint manually reduces multiplication of multiplicities in normalize inside ensureSubMult. Goal: change to reduceTyFamApp_maybe.

monoidal avatar Jun 08 '20 18:06 monoidal

Maybe? Though we do want (p `MultMul` q) `MultMul` r) to normalise to the same expression as p `MultMul` (q `MultMul r). And I'm not sure we can manage this with just reduceTyFamApp_maybe, can we?

aspiwack avatar Jun 19 '20 07:06 aspiwack

It depends on how smart we want Lint to be. More complex properties such as associativity could be just axioms and Core would have coercions witnessing them.

monoidal avatar Jun 19 '20 09:06 monoidal

Fair enough. I don't have strong opinion either way.

aspiwack avatar Jun 19 '20 10:06 aspiwack