Skip to content

Commit

Permalink
make same-unison-file check go faster
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellwrosen committed Nov 29, 2023
1 parent 011718f commit 6ffe0fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions unison-cli/src/Unison/Codebase/Editor/HandleInput/Update2.hs
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ handleUpdate2 = do
let smallUf = UF.discardTypes tuf
let noChanges =
and
[ UF.dataDeclarations smallUf == UF.dataDeclarations bigUf,
UF.effectDeclarations smallUf == UF.effectDeclarations bigUf,
UF.terms smallUf == UF.terms bigUf, -- no need to sort these, though it wouldn't hurt
UF.watches smallUf == UF.watches bigUf
[ Map.size (UF.dataDeclarations smallUf) == Map.size (UF.dataDeclarations bigUf),
Map.size (UF.effectDeclarations smallUf) == Map.size (UF.effectDeclarations bigUf),
length @[] (UF.terms smallUf) == length @[] (UF.terms bigUf),
Map.size (UF.watches smallUf) == Map.size (UF.watches bigUf)
]
if noChanges
then pure tuf
Expand Down

0 comments on commit 6ffe0fa

Please sign in to comment.