Skip to content
Snippets Groups Projects
Commit 2454bb10 authored by Sebastian Graf's avatar Sebastian Graf Committed by Marge Bot
Browse files

Make `Ord Literal` deterministic (#19438)

Previously, non-determinism arising from a use of `uniqCompareFS` in
`cmpLit` potentially crept into `CoreMap`, which we expect to behave
deterministically.

So we simply use `lexicalCompareFS` now.

Fixes #19438.
parent 72c0e078
No related branches found
No related tags found
No related merge requests found
......@@ -869,7 +869,7 @@ cmpLit (LitString a) (LitString b) = a `compare` b
cmpLit (LitNullAddr) (LitNullAddr) = EQ
cmpLit (LitFloat a) (LitFloat b) = a `compare` b
cmpLit (LitDouble a) (LitDouble b) = a `compare` b
cmpLit (LitLabel a _ _) (LitLabel b _ _) = a `uniqCompareFS` b
cmpLit (LitLabel a _ _) (LitLabel b _ _) = a `lexicalCompareFS` b
cmpLit (LitNumber nt1 a) (LitNumber nt2 b)
| nt1 == nt2 = a `compare` b
| otherwise = nt1 `compare` nt2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment