diff --git a/parser-typechecker/src/Unison/Syntax/TermPrinter.hs b/parser-typechecker/src/Unison/Syntax/TermPrinter.hs index 283bd6991f..d864435c57 100644 --- a/parser-typechecker/src/Unison/Syntax/TermPrinter.hs +++ b/parser-typechecker/src/Unison/Syntax/TermPrinter.hs @@ -675,7 +675,7 @@ printLetBinding :: (MonadPretty v m) => AmbientContext -> (v, Term3 v PrintAnnot printLetBinding context (v, binding) = if Var.isAction v then pretty0 context binding - else renderPrettyBinding <$> prettyBinding0' context (HQ.unsafeFromVar v) binding + else renderPrettyBinding <$> prettyBinding0' context (HQ.unsafeFromVar (Var.reset v)) binding prettyPattern :: forall v loc. @@ -1317,7 +1317,7 @@ printAnnotate n tm = Set.fromList [n | v <- ABT.allVars tm, n <- varToName v] usedTypeNames = Set.fromList [n | Ann' _ ty <- ABT.subterms tm, v <- ABT.allVars ty, n <- varToName v] - varToName v = toList (Name.parseText (Var.name v)) + varToName = toList . Name.parseText . Var.name . Var.reset go :: (Ord v) => Term2 v at ap v b -> Term2 v () () v b go = extraMap' id (const ()) (const ()) @@ -2213,7 +2213,7 @@ avoidShadowing tm (PrettyPrintEnv terms types) = in (HQ'.NameOnly fullName, HQ'.NameOnly resuffixifiedName) tweak _ p = p varToName :: (Var v) => v -> [Name] - varToName = toList . Name.parseText . Var.name + varToName = toList . Name.parseText . Var.name . Var.reset isLeaf :: Term2 vt at ap v a -> Bool isLeaf (Var' {}) = True diff --git a/unison-src/transcripts/idempotent/fix-5427.md b/unison-src/transcripts/idempotent/fix-5427.md index 8812085e66..cf8b25ef81 100644 --- a/unison-src/transcripts/idempotent/fix-5427.md +++ b/unison-src/transcripts/idempotent/fix-5427.md @@ -26,7 +26,7 @@ bar = change: ⍟ These new definitions are ok to `add`: - + bar : Nat foo : Nat ``` @@ -43,9 +43,9 @@ scratch/main> view bar bar : Nat bar = - foo1 _ = + foo _ = _ = foo - foo + .foo foo() ``` @@ -82,7 +82,7 @@ baz = foo + foo change: ⍟ These new definitions are ok to `add`: - + bar : Nat baz : Nat foo : Nat @@ -117,7 +117,7 @@ bar = ⍟ These names already exist. You can `update` them to your new definition: - + bar : Nat foo : Nat ```