alt-romes / hegg

Fast equality saturation in Haskell
https://hackage.haskell.org/package/hegg
BSD 3-Clause "New" or "Revised" License
75 stars 8 forks source link

Invariants: fix incomplete pattern match warning #33

Closed NadiaYvette closed 9 months ago

NadiaYvette commented 9 months ago

9.4.x seems to flag an incomplete pattern match where other ghc versions don't. Replacing the initial pattern guard match against an empty list with a final otherwise pattern guard clause silences it relatively intuitively. The semantics should be preserved as the use of the pattern guard match in testCompileToQuery is equivalent to case.

Compile-tested against 9.8.1, 9.6.2, 9.4.5, 9.2.8 and 8.10.7.

alt-romes commented 9 months ago

Ah, I see, that change makes sense. Thanks!