From 6ffe0fa34ed906fa685651a0e669c13f7ca97704 Mon Sep 17 00:00:00 2001 From: Mitchell Rosen Date: Wed, 29 Nov 2023 16:11:32 -0500 Subject: [PATCH] make same-unison-file check go faster --- .../src/Unison/Codebase/Editor/HandleInput/Update2.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unison-cli/src/Unison/Codebase/Editor/HandleInput/Update2.hs b/unison-cli/src/Unison/Codebase/Editor/HandleInput/Update2.hs index fb43a5c716..e7a8dbdbfb 100644 --- a/unison-cli/src/Unison/Codebase/Editor/HandleInput/Update2.hs +++ b/unison-cli/src/Unison/Codebase/Editor/HandleInput/Update2.hs @@ -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