Skip to content

Commit

Permalink
Revert "remove use usage example with an absolute name"
Browse files Browse the repository at this point in the history
This reverts commit 73293b7.
  • Loading branch information
mitchellwrosen committed Feb 10, 2025
1 parent 8896e87 commit a5e7d59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion parser-typechecker/src/Unison/PrintError.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2003,6 +2003,7 @@ useExamples =
"",
Pr.indentN 2 . Pr.column2 $
[ (Pr.blue "use math sqrt", Pr.wrap "Introduces `sqrt` as a local alias for `math.sqrt`"),
(Pr.blue "use List :+", Pr.wrap "Introduces `:+` as a local alias for `List.:+`.")
(Pr.blue "use List :+", Pr.wrap "Introduces `:+` as a local alias for `List.:+`."),
(Pr.blue "use .foo bar.baz", Pr.wrap "Introduces `bar.baz` as a local alias for the absolute name `.foo.bar.baz`")
]
]
10 changes: 6 additions & 4 deletions unison-src/transcripts/idempotent/fix-4536.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ foo =
Here's a few examples of valid `use` statements:
use math sqrt Introduces `sqrt` as a local alias for
`math.sqrt`
use List :+ Introduces `:+` as a local alias for
`List.:+`.
use math sqrt Introduces `sqrt` as a local alias for
`math.sqrt`
use List :+ Introduces `:+` as a local alias for
`List.:+`.
use .foo bar.baz Introduces `bar.baz` as a local alias for
the absolute name `.foo.bar.baz`
```

``` unison :error
Expand Down

0 comments on commit a5e7d59

Please sign in to comment.