diff --git a/lib/unison-prelude/src/Unison/Debug.hs b/lib/unison-prelude/src/Unison/Debug.hs index 47fdb2ee7..7881045c6 100644 --- a/lib/unison-prelude/src/Unison/Debug.hs +++ b/lib/unison-prelude/src/Unison/Debug.hs @@ -13,13 +13,12 @@ module Unison.Debug ) where -import Control.Applicative (empty) -import Control.Monad (when) -import Data.Set (Set) import Data.Set qualified as Set import Data.Text qualified as Text -import Debug.Pretty.Simple (pTrace, pTraceM, pTraceShowId, pTraceShowM) +import Debug.Pretty.Simple (pTrace, pTraceM) import System.IO.Unsafe (unsafePerformIO) +import Text.Pretty.Simple (pShow) +import Unison.Prelude import UnliftIO.Environment (lookupEnv) data DebugFlag @@ -148,7 +147,7 @@ debugPatternCoverageConstraintSolver = PatternCoverageConstraintSolver `Set.memb debug :: (Show a) => DebugFlag -> String -> a -> a debug flag msg a = if shouldDebug flag - then pTraceShowId (pTrace (msg <> ":\n") a) + then (pTrace (msg <> ":\n" <> into @String (pShow a)) a) else a -- | Use for selective debug logging in monadic contexts. @@ -159,8 +158,7 @@ debug flag msg a = debugM :: (Show a, Monad m) => DebugFlag -> String -> a -> m () debugM flag msg a = whenDebug flag do - pTraceM (msg <> ":\n") - pTraceShowM a + traceM (msg <> ":\n" <> into @String (pShow a)) debugLog :: DebugFlag -> String -> a -> a debugLog flag msg = diff --git a/unison-share-api/src/Unison/Server/Local.hs b/unison-share-api/src/Unison/Server/Local.hs index f5c3525f4..04a6d9f41 100644 --- a/unison-share-api/src/Unison/Server/Local.hs +++ b/unison-share-api/src/Unison/Server/Local.hs @@ -41,11 +41,11 @@ relocateToNameRoot perspective query rootBranch = do -- Since the project root is lower down we need to strip the part of the prefix -- which is now redundant. pure . Right $ (projectRoot, query <&> \n -> fromMaybe n $ Path.unprefixName (Path.Absolute remainder) n) - -- The namesRoot is _inside_ of the project containing the query + -- The namesRoot is _inside (or equal to)_ the project containing the query (_sharedPrefix, remainder, Path.Empty) -> do -- Since the project is higher up, we need to prefix the query -- with the remainder of the path - pure $ Right (projectRoot, query <&> Path.prefixNameIfRel (Path.AbsolutePath' $ Path.Absolute remainder)) + pure $ Right (projectRoot, query <&> Path.prefixNameIfRel (Path.RelativePath' $ Path.Relative remainder)) -- The namesRoot and project root are disjoint, this shouldn't ever happen. (_, _, _) -> pure $ Left (DisjointProjectAndPerspective perspective projectRoot) diff --git a/unison-src/builtin-tests/base.md b/unison-src/builtin-tests/base.md index d4717fdcc..70443ad0f 100644 --- a/unison-src/builtin-tests/base.md +++ b/unison-src/builtin-tests/base.md @@ -5,7 +5,7 @@ Thus, make sure the contents of this file define the contents of the cache (e.g. don't pull `latest`.) ```ucm -.> pull @unison/base/releases/2.5.0 .base -.> builtins.mergeio -.> undo +scratch/main> pull @unison/base/releases/2.5.0 .base +scratch/main> builtins.mergeio +scratch/main> undo ``` diff --git a/unison-src/builtin-tests/interpreter-tests.tpl.md b/unison-src/builtin-tests/interpreter-tests.tpl.md index 2d09efdc0..9e34968a7 100644 --- a/unison-src/builtin-tests/interpreter-tests.tpl.md +++ b/unison-src/builtin-tests/interpreter-tests.tpl.md @@ -5,12 +5,12 @@ If you want to add or update tests, you can create a branch of that project, and Before merging the PR on Github, we'll merge your branch on Share and restore `runtime_tests_version` to /main or maybe a release. ```ucm:hide:error -.> this is a hack to trigger an error, in order to swallow any error on the next line. -.> we delete the project to avoid any merge conflicts or complaints from ucm. -.> delete.project runtime-tests +scratch/main> this is a hack to trigger an error, in order to swallow any error on the next line. +scratch/main> we delete the project to avoid any merge conflicts or complaints from ucm. +scratch/main> delete.project runtime-tests ``` ```ucm:hide -.> clone ${runtime_tests_version} runtime-tests/selected +scratch/main> clone ${runtime_tests_version} runtime-tests/selected ``` ```ucm diff --git a/unison-src/builtin-tests/jit-tests.tpl.md b/unison-src/builtin-tests/jit-tests.tpl.md index b24a7c7c7..ea4a65793 100644 --- a/unison-src/builtin-tests/jit-tests.tpl.md +++ b/unison-src/builtin-tests/jit-tests.tpl.md @@ -5,12 +5,12 @@ If you want to add or update tests, you can create a branch of that project, and Before merging the PR on Github, we'll merge your branch on Share and restore `runtime_tests_version` to /main or maybe a release. ```ucm:hide:error -.> this is a hack to trigger an error, in order to swallow any error on the next line. -.> we delete the project to avoid any merge conflicts or complaints from ucm. -.> delete.project runtime-tests +scratch/main> this is a hack to trigger an error, in order to swallow any error on the next line. +scratch/main> we delete the project to avoid any merge conflicts or complaints from ucm. +scratch/main> delete.project runtime-tests ``` ```ucm:hide -.> clone ${runtime_tests_version} runtime-tests/selected +scratch/main> clone ${runtime_tests_version} runtime-tests/selected ``` ```ucm @@ -31,8 +31,8 @@ foo = do ``` ```ucm -.> run.native foo -.> run.native foo +scratch/main> run.native foo +scratch/main> run.native foo ``` This can also only be tested by separately running this test, because diff --git a/unison-src/transcripts-manual/benchmarks.md b/unison-src/transcripts-manual/benchmarks.md index 0a8ff9358..2a3fe38a6 100644 --- a/unison-src/transcripts-manual/benchmarks.md +++ b/unison-src/transcripts-manual/benchmarks.md @@ -1,6 +1,6 @@ ```ucm:hide -.> pull unison.public.base.releases.M4d base -.> pull runarorama.public.sort.data sort +scratch/main> pull unison.public.base.releases.M4d base +scratch/main> pull runarorama.public.sort.data sort ``` ```unison:hide @@ -34,63 +34,63 @@ prepare = do ``` ```ucm:hide -.> add -.> run prepare +scratch/main> add +scratch/main> run prepare ``` ## Benchmarks ```ucm -.> load unison-src/transcripts-manual/benchmarks/each.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/each.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/listmap.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/listmap.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/listfilter.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/listfilter.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/random.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/random.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/simpleloop.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/simpleloop.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/fibonacci.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/fibonacci.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/map.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/map.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/natmap.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/natmap.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/stm.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/stm.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/tmap.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/tmap.u +scratch/main> run main ``` ```ucm -.> load unison-src/transcripts-manual/benchmarks/array-sort.u -.> run main +scratch/main> load unison-src/transcripts-manual/benchmarks/array-sort.u +scratch/main> run main ``` \ No newline at end of file diff --git a/unison-src/transcripts-manual/remote-tab-completion.md b/unison-src/transcripts-manual/remote-tab-completion.md index da783b9de..55b4adeec 100644 --- a/unison-src/transcripts-manual/remote-tab-completion.md +++ b/unison-src/transcripts-manual/remote-tab-completion.md @@ -3,5 +3,5 @@ Note: this makes a network call to share to get completions ```ucm -.> debug.tab-complete pull unison.pub +scratch/main> debug.tab-complete pull unison.pub ``` diff --git a/unison-src/transcripts-manual/rewrites.md b/unison-src/transcripts-manual/rewrites.md index 15a5a0638..891cf53bd 100644 --- a/unison-src/transcripts-manual/rewrites.md +++ b/unison-src/transcripts-manual/rewrites.md @@ -1,8 +1,8 @@ ```ucm:hide -.> builtins.mergeio -.> load unison-src/transcripts-using-base/base.u -.> add +scratch/main> builtins.mergeio +scratch/main> load unison-src/transcripts-using-base/base.u +scratch/main> add ``` ## Structural find and replace @@ -37,19 +37,19 @@ rule2 x = @rewrite signature Optional ==> Optional2 Let's rewrite these: ```ucm -.> rewrite rule1 -.> rewrite eitherToOptional +scratch/main> rewrite rule1 +scratch/main> rewrite eitherToOptional ``` ```ucm:hide -.> load -.> add +scratch/main> load +scratch/main> add ``` After adding to the codebase, here's the rewritten source: ```ucm -.> view ex1 Either.mapRight rule1 +scratch/main> view ex1 Either.mapRight rule1 ``` Another example, showing that we can rewrite to definitions that only exist in the file: @@ -75,18 +75,18 @@ blah2 = 456 Let's apply the rewrite `woot1to2`: ```ucm -.> rewrite woot1to2 +scratch/main> rewrite woot1to2 ``` ```ucm:hide -.> load -.> add +scratch/main> load +scratch/main> add ``` After adding the rewritten form to the codebase, here's the rewritten `Woot1` to `Woot2`: ```ucm -.> view wootEx +scratch/main> view wootEx ``` This example shows that rewrite rules can to refer to term definitions that only exist in the file: @@ -111,15 +111,15 @@ sameFileEx = ``` ```ucm:hide -.> rewrite rule -.> load -.> add +scratch/main> rewrite rule +scratch/main> load +scratch/main> add ``` After adding the rewritten form to the codebase, here's the rewritten definitions: ```ucm -.> view foo1 foo2 sameFileEx +scratch/main> view foo1 foo2 sameFileEx ``` ## Capture avoidance @@ -145,13 +145,13 @@ sameFileEx = In the above example, `bar2` is locally bound by the rule, so when applied, it should not refer to the `bar2` top level binding. ```ucm -.> rewrite rule +scratch/main> rewrite rule ``` Instead, it should be an unbound free variable, which doesn't typecheck: ```ucm:error -.> load +scratch/main> load ``` In this example, the `a` is locally bound by the rule, so it shouldn't capture the `a = 39494` binding which is in scope at the point of the replacement: @@ -167,13 +167,13 @@ rule a = @rewrite ``` ```ucm -.> rewrite rule +scratch/main> rewrite rule ``` The `a` introduced will be freshened to not capture the `a` in scope, so it remains as an unbound variable and is a type error: ```ucm:error -.> load +scratch/main> load ``` ## Structural find @@ -183,7 +183,7 @@ eitherEx = Left ("hello", "there") ``` ```ucm:hide -.> add +scratch/main> add ``` ```unison:hide @@ -192,7 +192,7 @@ findEitherFailure = @rewrite signature a . Either Failure a ==> () ``` ```ucm -.> sfind findEitherEx -.> sfind findEitherFailure -.> find 1-5 +scratch/main> sfind findEitherEx +scratch/main> sfind findEitherFailure +scratch/main> find 1-5 ``` diff --git a/unison-src/transcripts-manual/rewrites.output.md b/unison-src/transcripts-manual/rewrites.output.md index 415330f13..d1ab897dc 100644 --- a/unison-src/transcripts-manual/rewrites.output.md +++ b/unison-src/transcripts-manual/rewrites.output.md @@ -31,7 +31,7 @@ rule2 x = @rewrite signature Optional ==> Optional2 Let's rewrite these: ```ucm -.> rewrite rule1 +scratch/main> rewrite rule1 ☝️ @@ -39,7 +39,7 @@ Let's rewrite these: The rewritten file has been added to the top of scratch.u -.> rewrite eitherToOptional +scratch/main> rewrite eitherToOptional ☝️ @@ -112,7 +112,7 @@ rule2 x = @rewrite signature Optional ==> Optional2 After adding to the codebase, here's the rewritten source: ```ucm -.> view ex1 Either.mapRight rule1 +scratch/main> view ex1 Either.mapRight rule1 Either.mapRight : (a ->{g} b) -> Optional a ->{g} Optional b Either.mapRight f = cases @@ -158,7 +158,7 @@ blah2 = 456 Let's apply the rewrite `woot1to2`: ```ucm -.> rewrite woot1to2 +scratch/main> rewrite woot1to2 ☝️ @@ -194,7 +194,7 @@ blah2 = 456 After adding the rewritten form to the codebase, here's the rewritten `Woot1` to `Woot2`: ```ucm -.> view wootEx +scratch/main> view wootEx wootEx : Nat ->{Woot2} Nat wootEx a = @@ -226,7 +226,7 @@ sameFileEx = After adding the rewritten form to the codebase, here's the rewritten definitions: ```ucm -.> view foo1 foo2 sameFileEx +scratch/main> view foo1 foo2 sameFileEx foo1 : Nat foo1 = @@ -267,7 +267,7 @@ sameFileEx = In the above example, `bar2` is locally bound by the rule, so when applied, it should not refer to the `bar2` top level binding. ```ucm -.> rewrite rule +scratch/main> rewrite rule ☝️ @@ -301,7 +301,7 @@ sameFileEx = Instead, it should be an unbound free variable, which doesn't typecheck: ```ucm -.> load +scratch/main> load Loading changes detected in scratch.u. @@ -332,7 +332,7 @@ rule a = @rewrite ``` ```ucm -.> rewrite rule +scratch/main> rewrite rule ☝️ @@ -358,7 +358,7 @@ rule a = The `a` introduced will be freshened to not capture the `a` in scope, so it remains as an unbound variable and is a type error: ```ucm -.> load +scratch/main> load Loading changes detected in scratch.u. @@ -388,7 +388,7 @@ findEitherFailure = @rewrite signature a . Either Failure a ==> () ``` ```ucm -.> sfind findEitherEx +scratch/main> sfind findEitherEx 🔎 @@ -398,7 +398,7 @@ findEitherFailure = @rewrite signature a . Either Failure a ==> () Tip: Try `edit 1` to bring this into your scratch file. -.> sfind findEitherFailure +scratch/main> sfind findEitherFailure 🔎 @@ -413,7 +413,7 @@ findEitherFailure = @rewrite signature a . Either Failure a ==> () Tip: Try `edit 1` or `edit 1-5` to bring these into your scratch file. -.> find 1-5 +scratch/main> find 1-5 1. Exception.catch : '{g, Exception} a ->{g} Either Failure a 2. Exception.reraise : Either Failure a ->{Exception} a diff --git a/unison-src/transcripts-manual/scheme.md b/unison-src/transcripts-manual/scheme.md index 1c1427280..35aae31b2 100644 --- a/unison-src/transcripts-manual/scheme.md +++ b/unison-src/transcripts-manual/scheme.md @@ -2,8 +2,8 @@ This transcript executes very slowly, because the compiler has an entire copy of base (and other stuff) within it. ```ucm:hide -.> builtins.merge -.> pull.without-history unison.public.base.trunk base +scratch/main> builtins.merge +scratch/main> pull.without-history unison.public.base.trunk base ``` ```unison @@ -55,7 +55,7 @@ multiAddUp = repeat 35 '(printAddUp 3000000) ``` ```ucm -.> add -.> run singleAddUp -.> run.native multiAddUp +scratch/main> add +scratch/main> run singleAddUp +scratch/main> run.native multiAddUp ``` diff --git a/unison-src/transcripts-using-base/_base.md b/unison-src/transcripts-using-base/_base.md index 1befbcb2e..8c4d8c707 100644 --- a/unison-src/transcripts-using-base/_base.md +++ b/unison-src/transcripts-using-base/_base.md @@ -10,9 +10,9 @@ transcripts which contain less boilerplate. ## Usage ```ucm:hide -.> builtins.mergeio -.> load unison-src/transcripts-using-base/base.u -.> add +scratch/main> builtins.mergeio +scratch/main> load unison-src/transcripts-using-base/base.u +scratch/main> add ``` The test shows that `hex (fromHex str) == str` as expected. @@ -24,7 +24,7 @@ test> hex.tests.ex1 = checks let ``` ```ucm:hide -.> test +scratch/main> test ``` Lets do some basic testing of our test harness to make sure its @@ -50,6 +50,6 @@ testAutoClean _ = ``` ```ucm -.> add -.> io.test testAutoClean +scratch/main> add +scratch/main> io.test testAutoClean ``` diff --git a/unison-src/transcripts-using-base/_base.output.md b/unison-src/transcripts-using-base/_base.output.md index 28419d8c7..ebc131c83 100644 --- a/unison-src/transcripts-using-base/_base.output.md +++ b/unison-src/transcripts-using-base/_base.output.md @@ -53,13 +53,13 @@ testAutoClean _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testAutoClean : '{IO} [Result] -.> io.test testAutoClean +scratch/main> io.test testAutoClean New test results: diff --git a/unison-src/transcripts-using-base/all-base-hashes.md b/unison-src/transcripts-using-base/all-base-hashes.md index d7050cb77..bb0f27c2c 100644 --- a/unison-src/transcripts-using-base/all-base-hashes.md +++ b/unison-src/transcripts-using-base/all-base-hashes.md @@ -1,5 +1,5 @@ This transcript is intended to make visible accidental changes to the hashing algorithm. ```ucm -.> find.verbose +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts-using-base/all-base-hashes.output.md b/unison-src/transcripts-using-base/all-base-hashes.output.md index 63c258e13..99d4128d0 100644 --- a/unison-src/transcripts-using-base/all-base-hashes.output.md +++ b/unison-src/transcripts-using-base/all-base-hashes.output.md @@ -1,7 +1,7 @@ This transcript is intended to make visible accidental changes to the hashing algorithm. ```ucm -.> find.verbose +scratch/main> find.verbose 1. -- #sgesq8035ut22q779pl1g4gqsg8c81894jjonmrq1bjltphkath225up841hk8dku59tnnc4laj9nggbofamgei4klof0ldc20uj2oo <| : (i ->{g} o) -> i ->{g} o diff --git a/unison-src/transcripts-using-base/binary-encoding-nats.md b/unison-src/transcripts-using-base/binary-encoding-nats.md index 711bcb330..2eee6caf5 100644 --- a/unison-src/transcripts-using-base/binary-encoding-nats.md +++ b/unison-src/transcripts-using-base/binary-encoding-nats.md @@ -54,6 +54,6 @@ testABunchOfNats _ = ``` ```ucm -.> add -.> io.test testABunchOfNats +scratch/main> add +scratch/main> io.test testABunchOfNats ``` diff --git a/unison-src/transcripts-using-base/binary-encoding-nats.output.md b/unison-src/transcripts-using-base/binary-encoding-nats.output.md index 669f89aa1..a0602ce7c 100644 --- a/unison-src/transcripts-using-base/binary-encoding-nats.output.md +++ b/unison-src/transcripts-using-base/binary-encoding-nats.output.md @@ -76,7 +76,7 @@ testABunchOfNats _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -91,7 +91,7 @@ testABunchOfNats _ = testNat : Nat -> '{IO, Stream Result} () testRoundTrip : Nat -> EncDec ->{IO, Stream Result} () -.> io.test testABunchOfNats +scratch/main> io.test testABunchOfNats New test results: diff --git a/unison-src/transcripts-using-base/codeops.md b/unison-src/transcripts-using-base/codeops.md index 4754eb0aa..1e2797769 100644 --- a/unison-src/transcripts-using-base/codeops.md +++ b/unison-src/transcripts-using-base/codeops.md @@ -153,7 +153,7 @@ swapped name link = ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -236,9 +236,9 @@ we gain the ability to capture output in a transcript, it can be modified to actual show that the serialization works. ```ucm -.> add -.> io.test tests -.> io.test badLoad +scratch/main> add +scratch/main> io.test tests +scratch/main> io.test badLoad ``` ```unison @@ -278,8 +278,8 @@ codeTests = ``` ```ucm -.> add -.> io.test codeTests +scratch/main> add +scratch/main> io.test codeTests ``` ```unison @@ -309,6 +309,6 @@ vtests _ = ``` ```ucm -.> add -.> io.test vtests +scratch/main> add +scratch/main> io.test vtests ``` diff --git a/unison-src/transcripts-using-base/codeops.output.md b/unison-src/transcripts-using-base/codeops.output.md index d1acab398..4cae121f3 100644 --- a/unison-src/transcripts-using-base/codeops.output.md +++ b/unison-src/transcripts-using-base/codeops.output.md @@ -200,7 +200,7 @@ swapped name link = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -344,7 +344,7 @@ we gain the ability to capture output in a transcript, it can be modified to actual show that the serialization works. ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -360,7 +360,7 @@ to actual show that the serialization works. tests : '{IO} [Result] zapper : Three Nat Nat Nat -> Request {Zap} r -> r -.> io.test tests +scratch/main> io.test tests New test results: @@ -382,7 +382,7 @@ to actual show that the serialization works. Tip: Use view 1 to view the source of a test. -.> io.test badLoad +scratch/main> io.test badLoad New test results: @@ -443,13 +443,13 @@ codeTests = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: codeTests : '{IO} [Result] -.> io.test codeTests +scratch/main> io.test codeTests New test results: @@ -530,14 +530,14 @@ vtests _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: validateTest : Link.Term ->{IO} Result vtests : '{IO} [Result] -.> io.test vtests +scratch/main> io.test vtests New test results: diff --git a/unison-src/transcripts-using-base/doc.md b/unison-src/transcripts-using-base/doc.md index 461a4f04b..52973ddb3 100644 --- a/unison-src/transcripts-using-base/doc.md +++ b/unison-src/transcripts-using-base/doc.md @@ -33,9 +33,9 @@ Notice that an anonymous documentation block `{{ ... }}` before a definition `Im You can preview what docs will look like when rendered to the console using the `display` or `docs` commands: ```ucm -.> display d1 -.> docs ImportantConstant -.> docs DayOfWeek +scratch/main> display d1 +scratch/main> docs ImportantConstant +scratch/main> docs DayOfWeek ``` The `docs ImportantConstant` command will look for `ImportantConstant.doc` in the file or codebase. You can do this instead of explicitly linking docs to definitions. @@ -45,11 +45,11 @@ The `docs ImportantConstant` command will look for `ImportantConstant.doc` in th First, we'll load the `syntax.u` file which has examples of all the syntax: ```ucm -.> load ./unison-src/transcripts-using-base/doc.md.files/syntax.u +scratch/main> load ./unison-src/transcripts-using-base/doc.md.files/syntax.u ``` ```ucm:hide -.> add +scratch/main> add ``` Now we can review different portions of the guide. @@ -57,25 +57,25 @@ we'll show both the pretty-printed source using `view` and the rendered output using `display`: ```ucm -.> view basicFormatting -.> display basicFormatting -.> view lists -.> display lists -.> view evaluation -.> display evaluation -.> view includingSource -.> display includingSource -.> view nonUnisonCodeBlocks -.> display nonUnisonCodeBlocks -.> view otherElements -.> display otherElements +scratch/main> view basicFormatting +scratch/main> display basicFormatting +scratch/main> view lists +scratch/main> display lists +scratch/main> view evaluation +scratch/main> display evaluation +scratch/main> view includingSource +scratch/main> display includingSource +scratch/main> view nonUnisonCodeBlocks +scratch/main> display nonUnisonCodeBlocks +scratch/main> view otherElements +scratch/main> display otherElements ``` Lastly, it's common to build longer documents including subdocuments via `{{ subdoc }}`. We can stitch together the full syntax guide in this way: ```ucm -.> view doc.guide -.> display doc.guide +scratch/main> view doc.guide +scratch/main> display doc.guide ``` 🌻 THE END diff --git a/unison-src/transcripts-using-base/doc.output.md b/unison-src/transcripts-using-base/doc.output.md index 43edad988..e47d8d073 100644 --- a/unison-src/transcripts-using-base/doc.output.md +++ b/unison-src/transcripts-using-base/doc.output.md @@ -51,15 +51,15 @@ Notice that an anonymous documentation block `{{ ... }}` before a definition `Im You can preview what docs will look like when rendered to the console using the `display` or `docs` commands: ```ucm -.> display d1 +scratch/main> display d1 Hello there Alice! -.> docs ImportantConstant +scratch/main> docs ImportantConstant An important constant, equal to `42` -.> docs DayOfWeek +scratch/main> docs DayOfWeek The 7 days of the week, defined as: @@ -73,7 +73,7 @@ The `docs ImportantConstant` command will look for `ImportantConstant.doc` in th First, we'll load the `syntax.u` file which has examples of all the syntax: ```ucm -.> load ./unison-src/transcripts-using-base/doc.md.files/syntax.u +scratch/main> load ./unison-src/transcripts-using-base/doc.md.files/syntax.u Loading changes detected in ./unison-src/transcripts-using-base/doc.md.files/syntax.u. @@ -100,7 +100,7 @@ we'll show both the pretty-printed source using `view` and the rendered output using `display`: ```ucm -.> view basicFormatting +scratch/main> view basicFormatting basicFormatting : Doc2 basicFormatting = @@ -130,7 +130,7 @@ and the rendered output using `display`: __Next up:__ {lists} }} -.> display basicFormatting +scratch/main> display basicFormatting # Basic formatting @@ -155,7 +155,7 @@ and the rendered output using `display`: *Next up:* lists -.> view lists +scratch/main> view lists lists : Doc2 lists = @@ -198,7 +198,7 @@ and the rendered output using `display`: 3. Get dressed. }} -.> display lists +scratch/main> display lists # Lists @@ -237,7 +237,7 @@ and the rendered output using `display`: 2. Take shower. 3. Get dressed. -.> view evaluation +scratch/main> view evaluation evaluation : Doc2 evaluation = @@ -272,7 +272,7 @@ and the rendered output using `display`: ``` }} -.> display evaluation +scratch/main> display evaluation # Evaluation @@ -300,7 +300,7 @@ and the rendered output using `display`: cube : Nat -> Nat cube x = x * x * x -.> view includingSource +scratch/main> view includingSource includingSource : Doc2 includingSource = @@ -341,7 +341,7 @@ and the rendered output using `display`: {{ docExample 1 do x -> sqr x }}. }} -.> display includingSource +scratch/main> display includingSource # Including Unison source code @@ -387,7 +387,7 @@ and the rendered output using `display`: application, you can put it in double backticks, like so: `sqr x`. This is equivalent to `sqr x`. -.> view nonUnisonCodeBlocks +scratch/main> view nonUnisonCodeBlocks nonUnisonCodeBlocks : Doc2 nonUnisonCodeBlocks = @@ -420,7 +420,7 @@ and the rendered output using `display`: ``` }} -.> display nonUnisonCodeBlocks +scratch/main> display nonUnisonCodeBlocks # Non-Unison code blocks @@ -449,7 +449,7 @@ and the rendered output using `display`: xs.foldLeft(Nil : List[A])((acc,a) => a +: acc) ``` -.> view otherElements +scratch/main> view otherElements otherElements : Doc2 otherElements = @@ -506,7 +506,7 @@ and the rendered output using `display`: ] }} }} -.> display otherElements +scratch/main> display otherElements There are also asides, callouts, tables, tooltips, and more. These don't currently have special syntax; just use the @@ -549,7 +549,7 @@ and the rendered output using `display`: Lastly, it's common to build longer documents including subdocuments via `{{ subdoc }}`. We can stitch together the full syntax guide in this way: ```ucm -.> view doc.guide +scratch/main> view doc.guide doc.guide : Doc2 doc.guide = @@ -569,7 +569,7 @@ Lastly, it's common to build longer documents including subdocuments via `{{ sub {{ otherElements }} }} -.> display doc.guide +scratch/main> display doc.guide # Unison computable documentation diff --git a/unison-src/transcripts-using-base/failure-tests.md b/unison-src/transcripts-using-base/failure-tests.md index 049b4fcbb..5f69a8c2a 100644 --- a/unison-src/transcripts-using-base/failure-tests.md +++ b/unison-src/transcripts-using-base/failure-tests.md @@ -19,13 +19,13 @@ test2 = do ``` ```ucm -.> add +scratch/main> add ``` ```ucm:error -.> io.test test1 +scratch/main> io.test test1 ``` ```ucm:error -.> io.test test2 +scratch/main> io.test test2 ``` diff --git a/unison-src/transcripts-using-base/failure-tests.output.md b/unison-src/transcripts-using-base/failure-tests.output.md index d59d3d7bc..7d33aad45 100644 --- a/unison-src/transcripts-using-base/failure-tests.output.md +++ b/unison-src/transcripts-using-base/failure-tests.output.md @@ -33,7 +33,7 @@ test2 = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -42,7 +42,7 @@ test2 = do ``` ```ucm -.> io.test test1 +scratch/main> io.test test1 💔💥 @@ -58,7 +58,7 @@ test2 = do ``` ```ucm -.> io.test test2 +scratch/main> io.test test2 💔💥 diff --git a/unison-src/transcripts-using-base/fix2358.md b/unison-src/transcripts-using-base/fix2358.md index 915a35060..1c543349e 100644 --- a/unison-src/transcripts-using-base/fix2358.md +++ b/unison-src/transcripts-using-base/fix2358.md @@ -10,5 +10,5 @@ timingApp2 _ = ``` ```ucm -.> run timingApp2 +scratch/main> run timingApp2 ``` diff --git a/unison-src/transcripts-using-base/fix2358.output.md b/unison-src/transcripts-using-base/fix2358.output.md index 61a3dd805..d20a06e16 100644 --- a/unison-src/transcripts-using-base/fix2358.output.md +++ b/unison-src/transcripts-using-base/fix2358.output.md @@ -23,7 +23,7 @@ timingApp2 _ = ``` ```ucm -.> run timingApp2 +scratch/main> run timingApp2 () diff --git a/unison-src/transcripts-using-base/fix3939.md b/unison-src/transcripts-using-base/fix3939.md index 7ec695e6c..e9634ee2f 100644 --- a/unison-src/transcripts-using-base/fix3939.md +++ b/unison-src/transcripts-using-base/fix3939.md @@ -6,7 +6,7 @@ meh = 9 ``` ```ucm -.> add -.> find meh -.> docs 1 +scratch/main> add +scratch/main> find meh +scratch/main> docs 1 ``` diff --git a/unison-src/transcripts-using-base/fix3939.output.md b/unison-src/transcripts-using-base/fix3939.output.md index 99197263c..ca4e6d909 100644 --- a/unison-src/transcripts-using-base/fix3939.output.md +++ b/unison-src/transcripts-using-base/fix3939.output.md @@ -20,20 +20,20 @@ meh = 9 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: meh : Nat meh.doc : Doc2 -.> find meh +scratch/main> find meh 1. meh : Nat 2. meh.doc : Doc2 -.> docs 1 +scratch/main> docs 1 A simple doc. diff --git a/unison-src/transcripts-using-base/hashing.md b/unison-src/transcripts-using-base/hashing.md index 99f7db247..f7d6a2bdd 100644 --- a/unison-src/transcripts-using-base/hashing.md +++ b/unison-src/transcripts-using-base/hashing.md @@ -3,7 +3,7 @@ Unison has cryptographic builtins for hashing and computing [HMACs](https://en.wikipedia.org/wiki/HMAC) (hash-based message authentication codes). This transcript shows their usage and has some test cases. ```ucm -.> ls builtin.Bytes +scratch/main> ls builtin.Bytes ``` Notice the `fromBase16` and `toBase16` functions. Here's some convenience functions for converting `Bytes` to and from base-16 `Text`. @@ -43,7 +43,7 @@ ex5 = crypto.hmac Sha2_256 mysecret f |> hex And here's the full API: ```ucm -.> find-in builtin.crypto +scratch/main> find-in builtin.crypto ``` Note that the universal versions of `hash` and `hmac` are currently unimplemented and will bomb at runtime: @@ -189,11 +189,11 @@ test> crypto.hash.numTests = ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> test +scratch/main> test ``` ## HMAC tests @@ -251,9 +251,9 @@ test> md5.tests.ex3 = ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> test +scratch/main> test ``` diff --git a/unison-src/transcripts-using-base/hashing.output.md b/unison-src/transcripts-using-base/hashing.output.md index 56d0ec8cb..e5d1be279 100644 --- a/unison-src/transcripts-using-base/hashing.output.md +++ b/unison-src/transcripts-using-base/hashing.output.md @@ -3,7 +3,7 @@ Unison has cryptographic builtins for hashing and computing [HMACs](https://en.wikipedia.org/wiki/HMAC) (hash-based message authentication codes). This transcript shows their usage and has some test cases. ```ucm -.> ls builtin.Bytes +scratch/main> ls builtin.Bytes 1. ++ (Bytes -> Bytes -> Bytes) 2. at (Nat -> Bytes -> Optional Nat) @@ -120,7 +120,7 @@ ex5 = crypto.hmac Sha2_256 mysecret f |> hex And here's the full API: ```ucm -.> find-in builtin.crypto +scratch/main> find-in builtin.crypto 1. type CryptoFailure 2. Ed25519.sign.impl : Bytes @@ -312,7 +312,7 @@ test> crypto.hash.numTests = ``` ```ucm -.> test +scratch/main> test Cached test results (`help testcache` to learn more) @@ -474,7 +474,7 @@ test> md5.tests.ex3 = ``` ```ucm -.> test +scratch/main> test Cached test results (`help testcache` to learn more) diff --git a/unison-src/transcripts-using-base/mvar.md b/unison-src/transcripts-using-base/mvar.md index d2114c2e2..81be1ed79 100644 --- a/unison-src/transcripts-using-base/mvar.md +++ b/unison-src/transcripts-using-base/mvar.md @@ -51,7 +51,7 @@ testMvars _ = runTest test ``` ```ucm -.> add -.> io.test testMvars +scratch/main> add +scratch/main> io.test testMvars ``` diff --git a/unison-src/transcripts-using-base/mvar.output.md b/unison-src/transcripts-using-base/mvar.output.md index d8940b562..7d92d90c5 100644 --- a/unison-src/transcripts-using-base/mvar.output.md +++ b/unison-src/transcripts-using-base/mvar.output.md @@ -66,14 +66,14 @@ testMvars _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: eitherCk : (a ->{g} Boolean) -> Either e a ->{g} Boolean testMvars : '{IO} [Result] -.> io.test testMvars +scratch/main> io.test testMvars New test results: diff --git a/unison-src/transcripts-using-base/nat-coersion.md b/unison-src/transcripts-using-base/nat-coersion.md index 3f7750189..ca5ad40f2 100644 --- a/unison-src/transcripts-using-base/nat-coersion.md +++ b/unison-src/transcripts-using-base/nat-coersion.md @@ -33,6 +33,6 @@ test = 'let ``` ```ucm -.> add -.> io.test test +scratch/main> add +scratch/main> io.test test ``` diff --git a/unison-src/transcripts-using-base/nat-coersion.output.md b/unison-src/transcripts-using-base/nat-coersion.output.md index 462254508..d4aaf5ef6 100644 --- a/unison-src/transcripts-using-base/nat-coersion.output.md +++ b/unison-src/transcripts-using-base/nat-coersion.output.md @@ -49,7 +49,7 @@ test = 'let ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -59,7 +59,7 @@ test = 'let -> Optional Float ->{Stream Result} () -.> io.test test +scratch/main> io.test test New test results: diff --git a/unison-src/transcripts-using-base/net.md b/unison-src/transcripts-using-base/net.md index b1125f701..067f9b9a4 100644 --- a/unison-src/transcripts-using-base/net.md +++ b/unison-src/transcripts-using-base/net.md @@ -10,7 +10,7 @@ socketAccept = compose reraise socketAccept.impl ``` ```ucm:hide -.> add +scratch/main> add ``` # Tests for network related builtins @@ -93,8 +93,8 @@ testDefaultPort _ = runTest test ``` ```ucm -.> add -.> io.test testDefaultPort +scratch/main> add +scratch/main> io.test testDefaultPort ``` This example demonstrates connecting a TCP client socket to a TCP server socket. A thread is started for both client and server. The server socket asks for any availalbe port (by passing "0" as the port number). The server thread then queries for the actual assigned port number, and puts that into an MVar which the client thread can read. The client thread then reads a string from the server and reports it back to the main thread via a different MVar. @@ -149,6 +149,6 @@ testTcpConnect = 'let ``` ```ucm -.> add -.> io.test testTcpConnect +scratch/main> add +scratch/main> io.test testTcpConnect ``` diff --git a/unison-src/transcripts-using-base/net.output.md b/unison-src/transcripts-using-base/net.output.md index 5a0951182..cae095824 100644 --- a/unison-src/transcripts-using-base/net.output.md +++ b/unison-src/transcripts-using-base/net.output.md @@ -107,7 +107,7 @@ testDefaultPort _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -115,7 +115,7 @@ testDefaultPort _ = testDefaultPort : '{IO} [Result] testExplicitHost : '{IO} [Result] -.> io.test testDefaultPort +scratch/main> io.test testDefaultPort New test results: @@ -194,7 +194,7 @@ testTcpConnect = 'let ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -202,7 +202,7 @@ testTcpConnect = 'let serverThread : MVar Nat -> Text -> '{IO} () testTcpConnect : '{IO} [Result] -.> io.test testTcpConnect +scratch/main> io.test testTcpConnect New test results: diff --git a/unison-src/transcripts-using-base/random-deserial.md b/unison-src/transcripts-using-base/random-deserial.md index 1a97ca73d..2c6ff77de 100644 --- a/unison-src/transcripts-using-base/random-deserial.md +++ b/unison-src/transcripts-using-base/random-deserial.md @@ -56,6 +56,6 @@ serialTests = do ``` ```ucm -.> add -.> io.test serialTests +scratch/main> add +scratch/main> io.test serialTests ``` diff --git a/unison-src/transcripts-using-base/random-deserial.output.md b/unison-src/transcripts-using-base/random-deserial.output.md index 1e1c234aa..2606511ba 100644 --- a/unison-src/transcripts-using-base/random-deserial.output.md +++ b/unison-src/transcripts-using-base/random-deserial.output.md @@ -74,7 +74,7 @@ serialTests = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -85,7 +85,7 @@ serialTests = do serialTests : '{IO, Exception} [Result] shuffle : Nat -> [a] -> [a] -.> io.test serialTests +scratch/main> io.test serialTests New test results: diff --git a/unison-src/transcripts-using-base/ref-promise.md b/unison-src/transcripts-using-base/ref-promise.md index dd54328ec..3c2575951 100644 --- a/unison-src/transcripts-using-base/ref-promise.md +++ b/unison-src/transcripts-using-base/ref-promise.md @@ -19,8 +19,8 @@ casTest = do ``` ```ucm -.> add -.> io.test casTest +scratch/main> add +scratch/main> io.test casTest ``` Promise is a simple one-shot awaitable condition. @@ -54,9 +54,9 @@ promiseConcurrentTest = do ``` ```ucm -.> add -.> io.test promiseSequentialTest -.> io.test promiseConcurrentTest +scratch/main> add +scratch/main> io.test promiseSequentialTest +scratch/main> io.test promiseConcurrentTest ``` CAS can be used to write an atomic update function. @@ -70,7 +70,7 @@ atomicUpdate ref f = ``` ```ucm -.> add +scratch/main> add ``` Promise can be used to write an operation that spawns N concurrent @@ -91,7 +91,7 @@ spawnN n fa = map Promise.read (go n []) ``` ```ucm -.> add +scratch/main> add ``` We can use these primitives to write a more interesting example, where @@ -123,6 +123,6 @@ fullTest = do ``` ```ucm -.> add -.> io.test fullTest +scratch/main> add +scratch/main> io.test fullTest ``` diff --git a/unison-src/transcripts-using-base/ref-promise.output.md b/unison-src/transcripts-using-base/ref-promise.output.md index e10b0a95d..9f4c700b1 100644 --- a/unison-src/transcripts-using-base/ref-promise.output.md +++ b/unison-src/transcripts-using-base/ref-promise.output.md @@ -32,13 +32,13 @@ casTest = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: casTest : '{IO} [Result] -.> io.test casTest +scratch/main> io.test casTest New test results: @@ -95,14 +95,14 @@ promiseConcurrentTest = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: promiseConcurrentTest : '{IO} [Result] promiseSequentialTest : '{IO} [Result] -.> io.test promiseSequentialTest +scratch/main> io.test promiseSequentialTest New test results: @@ -113,7 +113,7 @@ promiseConcurrentTest = do Tip: Use view 1 to view the source of a test. -.> io.test promiseConcurrentTest +scratch/main> io.test promiseConcurrentTest New test results: @@ -148,7 +148,7 @@ atomicUpdate ref f = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -187,7 +187,7 @@ spawnN n fa = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -236,13 +236,13 @@ fullTest = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: fullTest : '{IO} [Result] -.> io.test fullTest +scratch/main> io.test fullTest New test results: diff --git a/unison-src/transcripts-using-base/serial-test-00.md b/unison-src/transcripts-using-base/serial-test-00.md index ab71adfdd..21860243e 100644 --- a/unison-src/transcripts-using-base/serial-test-00.md +++ b/unison-src/transcripts-using-base/serial-test-00.md @@ -68,6 +68,6 @@ mkTestCase = do ``` ```ucm -.> add -.> run mkTestCase +scratch/main> add +scratch/main> run mkTestCase ``` diff --git a/unison-src/transcripts-using-base/serial-test-00.output.md b/unison-src/transcripts-using-base/serial-test-00.output.md index 715680f06..88a18a705 100644 --- a/unison-src/transcripts-using-base/serial-test-00.output.md +++ b/unison-src/transcripts-using-base/serial-test-00.output.md @@ -95,7 +95,7 @@ mkTestCase = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -115,7 +115,7 @@ mkTestCase = do tree2 : Tree Nat tree3 : Tree Text -.> run mkTestCase +scratch/main> run mkTestCase () diff --git a/unison-src/transcripts-using-base/serial-test-01.md b/unison-src/transcripts-using-base/serial-test-01.md index da25e8f4a..bc5f84af0 100644 --- a/unison-src/transcripts-using-base/serial-test-01.md +++ b/unison-src/transcripts-using-base/serial-test-01.md @@ -16,6 +16,6 @@ mkTestCase = do ``` ```ucm -.> add -.> run mkTestCase +scratch/main> add +scratch/main> run mkTestCase ``` diff --git a/unison-src/transcripts-using-base/serial-test-01.output.md b/unison-src/transcripts-using-base/serial-test-01.output.md index 919462163..5825b36ff 100644 --- a/unison-src/transcripts-using-base/serial-test-01.output.md +++ b/unison-src/transcripts-using-base/serial-test-01.output.md @@ -33,7 +33,7 @@ mkTestCase = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -43,7 +43,7 @@ mkTestCase = do l3 : [Char] mkTestCase : '{IO, Exception} () -.> run mkTestCase +scratch/main> run mkTestCase () diff --git a/unison-src/transcripts-using-base/serial-test-02.md b/unison-src/transcripts-using-base/serial-test-02.md index 3d13ee487..15518165a 100644 --- a/unison-src/transcripts-using-base/serial-test-02.md +++ b/unison-src/transcripts-using-base/serial-test-02.md @@ -30,6 +30,6 @@ mkTestCase = do ``` ```ucm -.> add -.> run mkTestCase +scratch/main> add +scratch/main> run mkTestCase ``` diff --git a/unison-src/transcripts-using-base/serial-test-02.output.md b/unison-src/transcripts-using-base/serial-test-02.output.md index a6957230e..ecbe82ebe 100644 --- a/unison-src/transcripts-using-base/serial-test-02.output.md +++ b/unison-src/transcripts-using-base/serial-test-02.output.md @@ -49,7 +49,7 @@ mkTestCase = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -61,7 +61,7 @@ mkTestCase = do prod : [Nat] -> Nat products : ([Nat], [Nat], [Nat]) -> Text -.> run mkTestCase +scratch/main> run mkTestCase () diff --git a/unison-src/transcripts-using-base/serial-test-03.md b/unison-src/transcripts-using-base/serial-test-03.md index d1f49c404..2e66f687d 100644 --- a/unison-src/transcripts-using-base/serial-test-03.md +++ b/unison-src/transcripts-using-base/serial-test-03.md @@ -44,6 +44,6 @@ mkTestCase = do ``` ```ucm -.> add -.> run mkTestCase +scratch/main> add +scratch/main> run mkTestCase ``` diff --git a/unison-src/transcripts-using-base/serial-test-03.output.md b/unison-src/transcripts-using-base/serial-test-03.output.md index c161d048b..f21afcbbb 100644 --- a/unison-src/transcripts-using-base/serial-test-03.output.md +++ b/unison-src/transcripts-using-base/serial-test-03.output.md @@ -68,7 +68,7 @@ mkTestCase = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -84,7 +84,7 @@ mkTestCase = do reset : '{DC r} r -> r suspSum : [Nat] -> Delayed Nat -.> run mkTestCase +scratch/main> run mkTestCase () diff --git a/unison-src/transcripts-using-base/serial-test-04.md b/unison-src/transcripts-using-base/serial-test-04.md index f4763238f..212b59c9e 100644 --- a/unison-src/transcripts-using-base/serial-test-04.md +++ b/unison-src/transcripts-using-base/serial-test-04.md @@ -14,6 +14,6 @@ mkTestCase = do ``` ```ucm -.> add -.> run mkTestCase +scratch/main> add +scratch/main> run mkTestCase ``` diff --git a/unison-src/transcripts-using-base/serial-test-04.output.md b/unison-src/transcripts-using-base/serial-test-04.output.md index ca1949502..044eabd26 100644 --- a/unison-src/transcripts-using-base/serial-test-04.output.md +++ b/unison-src/transcripts-using-base/serial-test-04.output.md @@ -28,7 +28,7 @@ mkTestCase = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -36,7 +36,7 @@ mkTestCase = do mutual0 : Nat -> Text mutual1 : Nat -> Text -.> run mkTestCase +scratch/main> run mkTestCase () diff --git a/unison-src/transcripts-using-base/stm.md b/unison-src/transcripts-using-base/stm.md index 032035316..1a036fd26 100644 --- a/unison-src/transcripts-using-base/stm.md +++ b/unison-src/transcripts-using-base/stm.md @@ -28,7 +28,7 @@ body k out v = ``` ```ucm -.> add +scratch/main> add ``` Test case. @@ -67,6 +67,6 @@ tests = '(map spawn nats) ``` ```ucm -.> add -.> io.test tests +scratch/main> add +scratch/main> io.test tests ``` diff --git a/unison-src/transcripts-using-base/stm.output.md b/unison-src/transcripts-using-base/stm.output.md index ecc5a3105..f54199f8e 100644 --- a/unison-src/transcripts-using-base/stm.output.md +++ b/unison-src/transcripts-using-base/stm.output.md @@ -44,7 +44,7 @@ body k out v = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -106,7 +106,7 @@ tests = '(map spawn nats) ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -115,7 +115,7 @@ tests = '(map spawn nats) spawn : Nat ->{IO} Result tests : '{IO} [Result] -.> io.test tests +scratch/main> io.test tests New test results: diff --git a/unison-src/transcripts-using-base/test-watch-dependencies.md b/unison-src/transcripts-using-base/test-watch-dependencies.md index 8f3c61056..3e7558da3 100644 --- a/unison-src/transcripts-using-base/test-watch-dependencies.md +++ b/unison-src/transcripts-using-base/test-watch-dependencies.md @@ -9,7 +9,7 @@ x = 999 ``` ```ucm:hide -.> add +scratch/main> add ``` Now, we update that definition and define a test-watch which depends on it. @@ -22,7 +22,7 @@ test> mytest = checks [x + 1 == 1001] We expect this 'add' to fail because the test is blocked by the update to `x`. ```ucm:error -.> add +scratch/main> add ``` --- @@ -35,5 +35,5 @@ test> useY = checks [y + 1 == 43] This should correctly identify `y` as a dependency and add that too. ```ucm -.> add useY +scratch/main> add useY ``` diff --git a/unison-src/transcripts-using-base/test-watch-dependencies.output.md b/unison-src/transcripts-using-base/test-watch-dependencies.output.md index 53835d0f6..7b71b244b 100644 --- a/unison-src/transcripts-using-base/test-watch-dependencies.output.md +++ b/unison-src/transcripts-using-base/test-watch-dependencies.output.md @@ -43,7 +43,7 @@ test> mytest = checks [x + 1 == 1001] We expect this 'add' to fail because the test is blocked by the update to `x`. ```ucm -.> add +scratch/main> add x These definitions failed: @@ -85,7 +85,7 @@ test> useY = checks [y + 1 == 43] This should correctly identify `y` as a dependency and add that too. ```ucm -.> add useY +scratch/main> add useY ⍟ I've added these definitions: diff --git a/unison-src/transcripts-using-base/thread.md b/unison-src/transcripts-using-base/thread.md index d2c271204..9811d192c 100644 --- a/unison-src/transcripts-using-base/thread.md +++ b/unison-src/transcripts-using-base/thread.md @@ -19,8 +19,8 @@ testBasicFork = 'let See if we can get another thread to stuff a value into a MVar ```ucm:hide -.> add -.> io.test testBasicFork +scratch/main> add +scratch/main> io.test testBasicFork ``` ```unison @@ -48,8 +48,8 @@ testBasicMultiThreadMVar = 'let ``` ```ucm -.> add -.> io.test testBasicMultiThreadMVar +scratch/main> add +scratch/main> io.test testBasicMultiThreadMVar ``` ```unison @@ -91,6 +91,6 @@ testTwoThreads = 'let ``` ```ucm -.> add -.> io.test testTwoThreads +scratch/main> add +scratch/main> io.test testTwoThreads ``` diff --git a/unison-src/transcripts-using-base/thread.output.md b/unison-src/transcripts-using-base/thread.output.md index 2fa1218ae..6fe4e8800 100644 --- a/unison-src/transcripts-using-base/thread.output.md +++ b/unison-src/transcripts-using-base/thread.output.md @@ -71,14 +71,14 @@ testBasicMultiThreadMVar = 'let ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testBasicMultiThreadMVar : '{IO} [Result] thread1 : Nat -> MVar Nat -> '{IO} () -.> io.test testBasicMultiThreadMVar +scratch/main> io.test testBasicMultiThreadMVar New test results: @@ -144,7 +144,7 @@ testTwoThreads = 'let ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -153,7 +153,7 @@ testTwoThreads = 'let (also named thread1) testTwoThreads : '{IO} [Result] -.> io.test testTwoThreads +scratch/main> io.test testTwoThreads New test results: diff --git a/unison-src/transcripts-using-base/tls.md b/unison-src/transcripts-using-base/tls.md index 77c66db49..71b473837 100644 --- a/unison-src/transcripts-using-base/tls.md +++ b/unison-src/transcripts-using-base/tls.md @@ -12,7 +12,7 @@ not_a_cert = "-----BEGIN SCHERMIFICATE-----\n-----END SCHERMIFICATE-----" ``` ```ucm:hide -.> add +scratch/main> add ``` # Using an alternative certificate store @@ -32,8 +32,8 @@ what_should_work _ = this_should_work ++ this_should_not_work ``` ```ucm -.> add -.> io.test what_should_work +scratch/main> add +scratch/main> io.test what_should_work ``` Test handshaking a client/server a local TCP connection using our @@ -191,8 +191,8 @@ testCNReject _ = ``` ```ucm -.> add -.> io.test testConnectSelfSigned -.> io.test testCAReject -.> io.test testCNReject +scratch/main> add +scratch/main> io.test testConnectSelfSigned +scratch/main> io.test testCAReject +scratch/main> io.test testCNReject ``` diff --git a/unison-src/transcripts-using-base/tls.output.md b/unison-src/transcripts-using-base/tls.output.md index 7e5f06cb0..a584bdfa9 100644 --- a/unison-src/transcripts-using-base/tls.output.md +++ b/unison-src/transcripts-using-base/tls.output.md @@ -43,7 +43,7 @@ what_should_work _ = this_should_work ++ this_should_not_work ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,7 +51,7 @@ what_should_work _ = this_should_work ++ this_should_not_work this_should_work : [Result] what_should_work : ∀ _. _ -> [Result] -.> io.test what_should_work +scratch/main> io.test what_should_work New test results: @@ -238,7 +238,7 @@ testCNReject _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -251,7 +251,7 @@ testCNReject _ = -> '{IO, Exception} Text testConnectSelfSigned : '{IO} [Result] -.> io.test testConnectSelfSigned +scratch/main> io.test testConnectSelfSigned New test results: @@ -261,7 +261,7 @@ testCNReject _ = Tip: Use view 1 to view the source of a test. -.> io.test testCAReject +scratch/main> io.test testCAReject New test results: @@ -271,7 +271,7 @@ testCNReject _ = Tip: Use view 1 to view the source of a test. -.> io.test testCNReject +scratch/main> io.test testCNReject New test results: diff --git a/unison-src/transcripts-using-base/utf8.md b/unison-src/transcripts-using-base/utf8.md index 107bd260c..4bf058657 100644 --- a/unison-src/transcripts-using-base/utf8.md +++ b/unison-src/transcripts-using-base/utf8.md @@ -3,7 +3,7 @@ Test for new Text -> Bytes conversions explicitly using UTF-8 as the encoding Unison has function for converting between `Text` and a UTF-8 `Bytes` encoding of the Text. ```ucm -.> find Utf8 +scratch/main> find Utf8 ``` ascii characters are encoded as single bytes (in the range 0-127). diff --git a/unison-src/transcripts-using-base/utf8.output.md b/unison-src/transcripts-using-base/utf8.output.md index 6bba05281..c06522211 100644 --- a/unison-src/transcripts-using-base/utf8.output.md +++ b/unison-src/transcripts-using-base/utf8.output.md @@ -3,7 +3,7 @@ Test for new Text -> Bytes conversions explicitly using UTF-8 as the encoding Unison has function for converting between `Text` and a UTF-8 `Bytes` encoding of the Text. ```ucm -.> find Utf8 +scratch/main> find Utf8 1. builtin.Text.toUtf8 : Text -> Bytes 2. Text.fromUtf8 : Bytes ->{Exception} Text diff --git a/unison-src/transcripts/abilities.md b/unison-src/transcripts/abilities.md index 3bf6c47ec..a45ee504d 100644 --- a/unison-src/transcripts/abilities.md +++ b/unison-src/transcripts/abilities.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Some random ability stuff to ensure things work. @@ -23,5 +23,5 @@ ha = cases ``` ```ucm -.> add +scratch/main> add ``` diff --git a/unison-src/transcripts/abilities.output.md b/unison-src/transcripts/abilities.output.md index c90d76a45..8fd69ddbc 100644 --- a/unison-src/transcripts/abilities.output.md +++ b/unison-src/transcripts/abilities.output.md @@ -32,7 +32,7 @@ ha = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/ability-order-doesnt-affect-hash.md b/unison-src/transcripts/ability-order-doesnt-affect-hash.md index 4a0606a4b..2e00cc0c2 100644 --- a/unison-src/transcripts/ability-order-doesnt-affect-hash.md +++ b/unison-src/transcripts/ability-order-doesnt-affect-hash.md @@ -15,6 +15,6 @@ term2 _ = () ``` ```ucm -.> add -.> names term1 +scratch/main> add +scratch/main> names term1 ``` diff --git a/unison-src/transcripts/ability-order-doesnt-affect-hash.output.md b/unison-src/transcripts/ability-order-doesnt-affect-hash.output.md index 879dc0c62..6f6eac30e 100644 --- a/unison-src/transcripts/ability-order-doesnt-affect-hash.output.md +++ b/unison-src/transcripts/ability-order-doesnt-affect-hash.output.md @@ -31,7 +31,7 @@ term2 _ = () ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -40,7 +40,7 @@ term2 _ = () term1 : '{Bar, Foo} () term2 : '{Bar, Foo} () -.> names term1 +scratch/main> names term1 Term Hash: #8hum58rlih diff --git a/unison-src/transcripts/add-run.md b/unison-src/transcripts/add-run.md index 99ac7792e..3eeea7c03 100644 --- a/unison-src/transcripts/add-run.md +++ b/unison-src/transcripts/add-run.md @@ -3,7 +3,7 @@ ## Basic usage ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -20,26 +20,26 @@ is2even = '(even 2) it errors if there isn't a previous run ```ucm:error -.> add.run foo +scratch/main> add.run foo ``` ```ucm -.> run is2even +scratch/main> run is2even ``` it errors if the desired result name conflicts with a name in the unison file ```ucm:error -.> add.run is2even +scratch/main> add.run is2even ``` otherwise, the result is successfully persisted ```ucm -.> add.run foo.bar.baz +scratch/main> add.run foo.bar.baz ``` ```ucm -.> view foo.bar.baz +scratch/main> view foo.bar.baz ``` ## It resolves references within the unison file @@ -56,8 +56,8 @@ main _ = y ``` ```ucm -.> run main -.> add.run result +scratch/main> run main +scratch/main> add.run result ``` ## It resolves references within the codebase @@ -68,7 +68,7 @@ inc x = x + 1 ``` ```ucm -.> add inc +scratch/main> add inc ``` ```unison @@ -77,9 +77,9 @@ main _ x = inc x ``` ```ucm -.> run main -.> add.run natfoo -.> view natfoo +scratch/main> run main +scratch/main> add.run natfoo +scratch/main> view natfoo ``` ## It captures scratch file dependencies at run time @@ -91,7 +91,7 @@ main = 'y ``` ```ucm -.> run main +scratch/main> run main ``` @@ -101,8 +101,8 @@ x = 50 this saves 2 to xres, rather than 100 ```ucm -.> add.run xres -.> view xres +scratch/main> add.run xres +scratch/main> view xres ``` ## It fails with a message if add cannot complete cleanly @@ -112,8 +112,8 @@ main = '5 ``` ```ucm:error -.> run main -.> add.run xres +scratch/main> run main +scratch/main> add.run xres ``` ## It works with absolute names diff --git a/unison-src/transcripts/add-run.output.md b/unison-src/transcripts/add-run.output.md index 3d97788e7..53cc27b94 100644 --- a/unison-src/transcripts/add-run.output.md +++ b/unison-src/transcripts/add-run.output.md @@ -31,7 +31,7 @@ is2even = '(even 2) it errors if there isn't a previous run ```ucm -.> add.run foo +scratch/main> add.run foo ⚠️ @@ -40,7 +40,7 @@ it errors if there isn't a previous run ``` ```ucm -.> run is2even +scratch/main> run is2even true @@ -48,7 +48,7 @@ it errors if there isn't a previous run it errors if the desired result name conflicts with a name in the unison file ```ucm -.> add.run is2even +scratch/main> add.run is2even ⚠️ @@ -58,7 +58,7 @@ unison file ``` otherwise, the result is successfully persisted ```ucm -.> add.run foo.bar.baz +scratch/main> add.run foo.bar.baz ⍟ I've added these definitions: @@ -66,7 +66,7 @@ otherwise, the result is successfully persisted ``` ```ucm -.> view foo.bar.baz +scratch/main> view foo.bar.baz foo.bar.baz : Boolean foo.bar.baz = true @@ -101,11 +101,11 @@ main _ = y ``` ```ucm -.> run main +scratch/main> run main a b -> a Nat.+ b Nat.+ z 10 -.> add.run result +scratch/main> add.run result ⍟ I've added these definitions: @@ -134,7 +134,7 @@ inc x = x + 1 ``` ```ucm -.> add inc +scratch/main> add inc ⍟ I've added these definitions: @@ -160,17 +160,17 @@ main _ x = inc x ``` ```ucm -.> run main +scratch/main> run main inc -.> add.run natfoo +scratch/main> add.run natfoo ⍟ I've added these definitions: natfoo : Nat -> Nat -.> view natfoo +scratch/main> view natfoo natfoo : Nat -> Nat natfoo = inc @@ -200,7 +200,7 @@ main = 'y ``` ```ucm -.> run main +scratch/main> run main 2 @@ -224,13 +224,13 @@ x = 50 ``` this saves 2 to xres, rather than 100 ```ucm -.> add.run xres +scratch/main> add.run xres ⍟ I've added these definitions: xres : Nat -.> view xres +scratch/main> view xres xres : Nat xres = 2 @@ -256,11 +256,11 @@ main = '5 ``` ```ucm -.> run main +scratch/main> run main 5 -.> add.run xres +scratch/main> add.run xres x These definitions failed: diff --git a/unison-src/transcripts/add-test-watch-roundtrip.md b/unison-src/transcripts/add-test-watch-roundtrip.md index e8d070d2b..9b1cacf47 100644 --- a/unison-src/transcripts/add-test-watch-roundtrip.md +++ b/unison-src/transcripts/add-test-watch-roundtrip.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -10,6 +10,6 @@ foo = [] Apparently when we add a test watch, we add a type annotation to it, even if it already has one. We don't want this to happen though! ```ucm -.> add -.> view foo +scratch/main> add +scratch/main> view foo ``` diff --git a/unison-src/transcripts/add-test-watch-roundtrip.output.md b/unison-src/transcripts/add-test-watch-roundtrip.output.md index 5c9389ca1..114d9399f 100644 --- a/unison-src/transcripts/add-test-watch-roundtrip.output.md +++ b/unison-src/transcripts/add-test-watch-roundtrip.output.md @@ -6,13 +6,13 @@ foo = [] Apparently when we add a test watch, we add a type annotation to it, even if it already has one. We don't want this to happen though! ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: foo : [Result] -.> view foo +scratch/main> view foo foo : [Result] foo : [Result] diff --git a/unison-src/transcripts/addupdatemessages.md b/unison-src/transcripts/addupdatemessages.md index c644d921a..9c7daea43 100644 --- a/unison-src/transcripts/addupdatemessages.md +++ b/unison-src/transcripts/addupdatemessages.md @@ -3,7 +3,7 @@ Let's set up some definitions to start: ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -17,7 +17,7 @@ structural type Y = Two Nat Nat Expected: `x` and `y`, `X`, and `Y` exist as above. UCM tells you this. ```ucm -.> add +scratch/main> add ``` Let's add an alias for `1` and `One`: @@ -32,7 +32,7 @@ Expected: `z` is now `1`. UCM tells you that this definition is also called `x`. Also, `Z` is an alias for `X`. ```ucm -.> add +scratch/main> add ``` Let's update something that has an alias (to a value that doesn't have a name already): @@ -45,7 +45,7 @@ structural type X = Three Nat Nat Nat Expected: `x` is now `3` and `X` has constructor `Three`. UCM tells you the old definitions were also called `z` and `Z` and these names have also been updated. ```ucm -.> update +scratch/main> update ``` Update it to something that already exists with a different name: @@ -58,6 +58,6 @@ structural type X = Two Nat Nat Expected: `x` is now `2` and `X` is `Two`. UCM says the old definition was also named `z/Z`, and was also updated. And it says the new definition is also named `y/Y`. ```ucm -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/addupdatemessages.output.md b/unison-src/transcripts/addupdatemessages.output.md index 44925f17c..ffd7bbd80 100644 --- a/unison-src/transcripts/addupdatemessages.output.md +++ b/unison-src/transcripts/addupdatemessages.output.md @@ -29,7 +29,7 @@ structural type Y = Two Nat Nat Expected: `x` and `y`, `X`, and `Y` exist as above. UCM tells you this. ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -67,7 +67,7 @@ Expected: `z` is now `1`. UCM tells you that this definition is also called `x`. Also, `Z` is an alias for `X`. ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -104,7 +104,7 @@ structural type X = Three Nat Nat Nat Expected: `x` is now `3` and `X` has constructor `Three`. UCM tells you the old definitions were also called `z` and `Z` and these names have also been updated. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -143,7 +143,7 @@ structural type X = Two Nat Nat Expected: `x` is now `2` and `X` is `Two`. UCM says the old definition was also named `z/Z`, and was also updated. And it says the new definition is also named `y/Y`. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/alias-many.md b/unison-src/transcripts/alias-many.md index c682faf22..57450c64d 100644 --- a/unison-src/transcripts/alias-many.md +++ b/unison-src/transcripts/alias-many.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge lib.builtins ``` ```unison:hide:all List.adjacentPairs : [a] -> [(a, a)] @@ -95,14 +95,14 @@ List.takeWhile p xs = go xs [] ``` ```ucm:hide -.stuff> add +scratch/main> add ``` The `alias.many` command can be used to copy definitions from the current namespace into your curated one. The names that will be used in the target namespace are the names you specify, relative to the current namespace: ``` -.> help alias.many +scratch/main> help alias.many alias.many (or copy) `alias.many [relative2...] ` creates aliases `relative1`, `relative2`, ... @@ -113,8 +113,8 @@ The names that will be used in the target namespace are the names you specify, r Let's try it! ```ucm -.> alias.many stuff.List.adjacentPairs stuff.List.all stuff.List.any stuff.List.chunk stuff.List.chunksOf stuff.List.dropWhile stuff.List.first stuff.List.init stuff.List.intersperse stuff.List.isEmpty stuff.List.last stuff.List.replicate stuff.List.splitAt stuff.List.tail stuff.List.takeWhile .mylib -.> find-in mylib +scratch/main> alias.many List.adjacentPairs List.all List.any List.chunk List.chunksOf List.dropWhile List.first List.init List.intersperse List.isEmpty List.last List.replicate List.splitAt List.tail List.takeWhile mylib +scratch/main> find-in mylib ``` Thanks, `alias.many`! diff --git a/unison-src/transcripts/alias-many.output.md b/unison-src/transcripts/alias-many.output.md index 8236c60d0..b12422e09 100644 --- a/unison-src/transcripts/alias-many.output.md +++ b/unison-src/transcripts/alias-many.output.md @@ -1,8 +1,8 @@ The `alias.many` command can be used to copy definitions from the current namespace into your curated one. The names that will be used in the target namespace are the names you specify, relative to the current namespace: -``` -.> help alias.many +```scratch +/main> help alias.many alias.many (or copy) `alias.many [relative2...] ` creates aliases `relative1`, `relative2`, ... @@ -14,55 +14,51 @@ The names that will be used in the target namespace are the names you specify, r Let's try it! ```ucm -.> alias.many stuff.List.adjacentPairs stuff.List.all stuff.List.any stuff.List.chunk stuff.List.chunksOf stuff.List.dropWhile stuff.List.first stuff.List.init stuff.List.intersperse stuff.List.isEmpty stuff.List.last stuff.List.replicate stuff.List.splitAt stuff.List.tail stuff.List.takeWhile .mylib +scratch/main> alias.many List.adjacentPairs List.all List.any List.chunk List.chunksOf List.dropWhile List.first List.init List.intersperse List.isEmpty List.last List.replicate List.splitAt List.tail List.takeWhile mylib - Here's what changed in .mylib : + Here's what changed in mylib : Added definitions: - 1. stuff.List.adjacentPairs : [a] -> [(a, a)] - 2. stuff.List.all : (a ->{g} Boolean) - -> [a] - ->{g} Boolean - 3. stuff.List.any : (a ->{g} Boolean) - -> [a] - ->{g} Boolean - 4. stuff.List.chunk : Nat -> [a] -> [[a]] - 5. stuff.List.chunksOf : Nat -> [a] -> [[a]] - 6. stuff.List.dropWhile : (a ->{g} Boolean) - -> [a] - ->{g} [a] - 7. stuff.List.first : [a] -> Optional a - 8. stuff.List.init : [a] -> Optional [a] - 9. stuff.List.intersperse : a -> [a] -> [a] - 10. stuff.List.isEmpty : [a] -> Boolean - 11. stuff.List.last : [a] -> Optional a - 12. stuff.List.replicate : Nat -> a -> [a] - 13. stuff.List.splitAt : Nat -> [a] -> ([a], [a]) - 14. stuff.List.tail : [a] -> Optional [a] - 15. stuff.List.takeWhile : (a ->{𝕖} Boolean) - -> [a] - ->{𝕖} [a] + 1. List.adjacentPairs : [a] -> [(a, a)] + 2. List.all : (a ->{g} Boolean) + -> [a] + ->{g} Boolean + 3. List.any : (a ->{g} Boolean) + -> [a] + ->{g} Boolean + 4. List.chunk : Nat -> [a] -> [[a]] + 5. List.chunksOf : Nat -> [a] -> [[a]] + 6. List.dropWhile : (a ->{g} Boolean) -> [a] ->{g} [a] + 7. List.first : [a] -> Optional a + 8. List.init : [a] -> Optional [a] + 9. List.intersperse : a -> [a] -> [a] + 10. List.isEmpty : [a] -> Boolean + 11. List.last : [a] -> Optional a + 12. List.replicate : Nat -> a -> [a] + 13. List.splitAt : Nat -> [a] -> ([a], [a]) + 14. List.tail : [a] -> Optional [a] + 15. List.takeWhile : (a ->{𝕖} Boolean) -> [a] ->{𝕖} [a] Tip: You can use `undo` or `reflog` to undo this change. -.> find-in mylib +scratch/main> find-in mylib - 1. stuff.List.adjacentPairs : [a] -> [(a, a)] - 2. stuff.List.all : (a ->{g} Boolean) -> [a] ->{g} Boolean - 3. stuff.List.any : (a ->{g} Boolean) -> [a] ->{g} Boolean - 4. stuff.List.chunk : Nat -> [a] -> [[a]] - 5. stuff.List.chunksOf : Nat -> [a] -> [[a]] - 6. stuff.List.dropWhile : (a ->{g} Boolean) -> [a] ->{g} [a] - 7. stuff.List.first : [a] -> Optional a - 8. stuff.List.init : [a] -> Optional [a] - 9. stuff.List.intersperse : a -> [a] -> [a] - 10. stuff.List.isEmpty : [a] -> Boolean - 11. stuff.List.last : [a] -> Optional a - 12. stuff.List.replicate : Nat -> a -> [a] - 13. stuff.List.splitAt : Nat -> [a] -> ([a], [a]) - 14. stuff.List.tail : [a] -> Optional [a] - 15. stuff.List.takeWhile : (a ->{𝕖} Boolean) -> [a] ->{𝕖} [a] + 1. List.adjacentPairs : [a] -> [(a, a)] + 2. List.all : (a ->{g} Boolean) -> [a] ->{g} Boolean + 3. List.any : (a ->{g} Boolean) -> [a] ->{g} Boolean + 4. List.chunk : Nat -> [a] -> [[a]] + 5. List.chunksOf : Nat -> [a] -> [[a]] + 6. List.dropWhile : (a ->{g} Boolean) -> [a] ->{g} [a] + 7. List.first : [a] -> Optional a + 8. List.init : [a] -> Optional [a] + 9. List.intersperse : a -> [a] -> [a] + 10. List.isEmpty : [a] -> Boolean + 11. List.last : [a] -> Optional a + 12. List.replicate : Nat -> a -> [a] + 13. List.splitAt : Nat -> [a] -> ([a], [a]) + 14. List.tail : [a] -> Optional [a] + 15. List.takeWhile : (a ->{𝕖} Boolean) -> [a] ->{𝕖} [a] ``` diff --git a/unison-src/transcripts/anf-tests.md b/unison-src/transcripts/anf-tests.md index 122a67306..2a15836eb 100644 --- a/unison-src/transcripts/anf-tests.md +++ b/unison-src/transcripts/anf-tests.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This tests a variable related bug in the ANF compiler. @@ -29,6 +29,6 @@ foo _ = ``` ```ucm -.> add +scratch/main> add ``` diff --git a/unison-src/transcripts/anf-tests.output.md b/unison-src/transcripts/anf-tests.output.md index c200d1056..b9360ee4c 100644 --- a/unison-src/transcripts/anf-tests.output.md +++ b/unison-src/transcripts/anf-tests.output.md @@ -45,7 +45,7 @@ foo _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/any-extract.md b/unison-src/transcripts/any-extract.md index 5e9d09324..e65b36606 100644 --- a/unison-src/transcripts/any-extract.md +++ b/unison-src/transcripts/any-extract.md @@ -1,9 +1,9 @@ # Unit tests for Any.unsafeExtract ```ucm:hide -.> builtins.mergeio -.> load unison-src/transcripts-using-base/base.u -.> add +scratch/main> builtins.mergeio +scratch/main> load unison-src/transcripts-using-base/base.u +scratch/main> add ``` Any.unsafeExtract is a way to extract the value contained in an Any. This is unsafe because it allows the programmer to coerce a value into any type, which would cause undefined behaviour if used to coerce a value to the wrong type. @@ -19,5 +19,5 @@ test> Any.unsafeExtract.works = ``` ```ucm -.> add +scratch/main> add ``` diff --git a/unison-src/transcripts/any-extract.output.md b/unison-src/transcripts/any-extract.output.md index 75567fb41..c8fc99095 100644 --- a/unison-src/transcripts/any-extract.output.md +++ b/unison-src/transcripts/any-extract.output.md @@ -32,7 +32,7 @@ test> Any.unsafeExtract.works = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/api-doc-rendering.md b/unison-src/transcripts/api-doc-rendering.md index 6deffaaba..eb0d95694 100644 --- a/unison-src/transcripts/api-doc-rendering.md +++ b/unison-src/transcripts/api-doc-rendering.md @@ -1,7 +1,7 @@ # Doc rendering ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -82,13 +82,13 @@ term = 42 ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> display term.doc +scratch/main> display term.doc ``` ```api -GET /api/non-project-code/getDefinition?names=term +GET /api/projects/scratch/branches/main/getDefinition?names=term ``` diff --git a/unison-src/transcripts/api-doc-rendering.output.md b/unison-src/transcripts/api-doc-rendering.output.md index cac34211a..f767c14cf 100644 --- a/unison-src/transcripts/api-doc-rendering.output.md +++ b/unison-src/transcripts/api-doc-rendering.output.md @@ -78,7 +78,7 @@ term = 42 ``` ```ucm -.> display term.doc +scratch/main> display term.doc # Heading @@ -147,7 +147,7 @@ term = 42 ``` ```api -GET /api/non-project-code/getDefinition?names=term +GET /api/projects/scratch/branches/main/getDefinition?names=term { "missingDefinitions": [], "termDefinitions": { diff --git a/unison-src/transcripts/api-find.md b/unison-src/transcripts/api-find.md index 201d3cad8..f11d98bfc 100644 --- a/unison-src/transcripts/api-find.md +++ b/unison-src/transcripts/api-find.md @@ -8,19 +8,19 @@ joey.yaml.zz = 45 ``` ```ucm -.> add +scratch/main> add ``` ```api -- Namespace segment prefix search -GET /api/non-project-code/find?query=http +GET /api/projects/scratch/branches/main/find?query=http -- Namespace segment suffix search -GET /api/non-project-code/find?query=Server +GET /api/projects/scratch/branches/main/find?query=Server -- Substring search -GET /api/non-project-code/find?query=lesys +GET /api/projects/scratch/branches/main/find?query=lesys -- Cross-segment search -GET /api/non-project-code/find?query=joey.http +GET /api/projects/scratch/branches/main/find?query=joey.http ``` diff --git a/unison-src/transcripts/api-find.output.md b/unison-src/transcripts/api-find.output.md index 6505a1a32..d44200e7a 100644 --- a/unison-src/transcripts/api-find.output.md +++ b/unison-src/transcripts/api-find.output.md @@ -24,7 +24,7 @@ joey.yaml.zz = 45 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -36,7 +36,7 @@ joey.yaml.zz = 45 ``` ```api -- Namespace segment prefix search -GET /api/non-project-code/find?query=http +GET /api/projects/scratch/branches/main/find?query=http [ [ { @@ -122,7 +122,7 @@ GET /api/non-project-code/find?query=http ] ] -- Namespace segment suffix search -GET /api/non-project-code/find?query=Server +GET /api/projects/scratch/branches/main/find?query=Server [ [ { @@ -167,7 +167,7 @@ GET /api/non-project-code/find?query=Server ] ] -- Substring search -GET /api/non-project-code/find?query=lesys +GET /api/projects/scratch/branches/main/find?query=lesys [ [ { @@ -212,7 +212,7 @@ GET /api/non-project-code/find?query=lesys ] ] -- Cross-segment search -GET /api/non-project-code/find?query=joey.http +GET /api/projects/scratch/branches/main/find?query=joey.http [ [ { diff --git a/unison-src/transcripts/api-getDefinition.md b/unison-src/transcripts/api-getDefinition.md index 4a56b2bc9..94f2341e7 100644 --- a/unison-src/transcripts/api-getDefinition.md +++ b/unison-src/transcripts/api-getDefinition.md @@ -1,54 +1,50 @@ # Get Definitions Test ```ucm:hide -.nested> builtins.mergeio +scratch/main> builtins.mergeio lib.builtins ``` ```unison:hide -{{ Documentation }} -names.x = 42 +nested.names.x.doc = {{ Documentation }} +nested.names.x = 42 ``` ```ucm:hide -.nested> add +scratch/main> add ``` ```api -- Should NOT find names by suffix -GET /api/non-project-code/getDefinition?names=x +GET /api/projects/scratch/branches/main/getDefinition?names=x -- Term names should strip relativeTo prefix. -GET /api/non-project-code/getDefinition?names=names.x&relativeTo=nested +GET /api/projects/scratch/branches/main/getDefinition?names=names.x&relativeTo=nested -- Should find definitions by hash, names should be relative -GET /api/non-project-code/getDefinition?names=%23qkhkl0n238&relativeTo=nested -``` - -```ucm:hide -.doctest> builtins.mergeio +GET /api/projects/scratch/branches/main/getDefinition?names=%23qkhkl0n238&relativeTo=nested ``` ```unison:hide -thing.doc = {{ The correct docs for the thing }} -thing = "A thing" -thingalias.doc = {{ Docs for the alias, should not be displayed }} -thingalias = "A thing" -otherstuff.thing.doc = {{ A doc for a different term with the same name, should not be displayed }} -otherstuff.thing = "A different thing" +doctest.thing.doc = {{ The correct docs for the thing }} +doctest.thing = "A thing" +doctest.thingalias.doc = {{ Docs for the alias, should not be displayed }} +doctest.thingalias = "A thing" +doctest.otherstuff.thing.doc = {{ A doc for a different term with the same name, should not be displayed }} +doctest.otherstuff.thing = "A different thing" ``` ```ucm:hide -.doctest> add +scratch/main> add ``` Only docs for the term we request should be returned, even if there are other term docs with the same suffix. ```api -GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest +GET /api/projects/scratch/branches/main/getDefinition?names=thing&relativeTo=doctest ``` If we request a doc, the api should return the source, but also the rendered doc should appear in the 'termDocs' list. ```api -GET /api/non-project-code/getDefinition?names=thing.doc&relativeTo=doctest +GET /api/projects/scratch/branches/main/getDefinition?names=thing.doc&relativeTo=doctest ``` diff --git a/unison-src/transcripts/api-getDefinition.output.md b/unison-src/transcripts/api-getDefinition.output.md index 24debb744..5e854a440 100644 --- a/unison-src/transcripts/api-getDefinition.output.md +++ b/unison-src/transcripts/api-getDefinition.output.md @@ -1,13 +1,13 @@ # Get Definitions Test ```unison -{{ Documentation }} -names.x = 42 +nested.names.x.doc = {{ Documentation }} +nested.names.x = 42 ``` ```api -- Should NOT find names by suffix -GET /api/non-project-code/getDefinition?names=x +GET /api/projects/scratch/branches/main/getDefinition?names=x { "missingDefinitions": [ "x" @@ -16,7 +16,7 @@ GET /api/non-project-code/getDefinition?names=x "typeDefinitions": {} } -- Term names should strip relativeTo prefix. -GET /api/non-project-code/getDefinition?names=names.x&relativeTo=nested +GET /api/projects/scratch/branches/main/getDefinition?names=names.x&relativeTo=nested { "missingDefinitions": [], "termDefinitions": { @@ -104,14 +104,14 @@ GET /api/non-project-code/getDefinition?names=names.x&relativeTo=nested ] ], "termNames": [ - "names.x" + "nested.names.x" ] } }, "typeDefinitions": {} } -- Should find definitions by hash, names should be relative -GET /api/non-project-code/getDefinition?names=%23qkhkl0n238&relativeTo=nested +GET /api/projects/scratch/branches/main/getDefinition?names=%23qkhkl0n238&relativeTo=nested { "missingDefinitions": [], "termDefinitions": { @@ -199,30 +199,30 @@ GET /api/non-project-code/getDefinition?names=%23qkhkl0n238&relativeTo=nested ] ], "termNames": [ - "names.x" + "nested.names.x" ] } }, "typeDefinitions": {} } ``````unison -thing.doc = {{ The correct docs for the thing }} -thing = "A thing" -thingalias.doc = {{ Docs for the alias, should not be displayed }} -thingalias = "A thing" -otherstuff.thing.doc = {{ A doc for a different term with the same name, should not be displayed }} -otherstuff.thing = "A different thing" +doctest.thing.doc = {{ The correct docs for the thing }} +doctest.thing = "A thing" +doctest.thingalias.doc = {{ Docs for the alias, should not be displayed }} +doctest.thingalias = "A thing" +doctest.otherstuff.thing.doc = {{ A doc for a different term with the same name, should not be displayed }} +doctest.otherstuff.thing = "A different thing" ``` Only docs for the term we request should be returned, even if there are other term docs with the same suffix. ```api -GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest +GET /api/projects/scratch/branches/main/getDefinition?names=thing&relativeTo=doctest { "missingDefinitions": [], "termDefinitions": { "#jksc1s5kud95ro5ivngossullt2oavsd41s3u48bch67jf3gknru5j6hmjslonkd5sdqs8mr8k4rrnef8fodngbg4sm7u6au564ekjg": { - "bestTermName": "thing", + "bestTermName": "doctest.thing", "defnTermTag": "Plain", "signature": [ { @@ -237,10 +237,10 @@ GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest "contents": [ { "annotation": { - "contents": "thing", + "contents": "doctest.thing", "tag": "HashQualifier" }, - "segment": "thing" + "segment": "doctest.thing" }, { "annotation": { @@ -265,10 +265,10 @@ GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest }, { "annotation": { - "contents": "thing", + "contents": "doctest.thing", "tag": "HashQualifier" }, - "segment": "thing" + "segment": "doctest.thing" }, { "annotation": { @@ -291,7 +291,7 @@ GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest }, "termDocs": [ [ - "thing.doc", + "doctest.thing.doc", "#t9qfdoiuskj4n9go8cftj1r83s43s3o7sppafm5vr0bq5feieb7ap0cie5ed2qsf9g3ig448vffhnajinq81pnnkila1jp2epa7f26o", { "contents": [ @@ -325,8 +325,8 @@ GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest ] ], "termNames": [ - "thing", - "thingalias" + "doctest.thing", + "doctest.thingalias" ] } }, @@ -335,12 +335,12 @@ GET /api/non-project-code/getDefinition?names=thing&relativeTo=doctest ```If we request a doc, the api should return the source, but also the rendered doc should appear in the 'termDocs' list. ```api -GET /api/non-project-code/getDefinition?names=thing.doc&relativeTo=doctest +GET /api/projects/scratch/branches/main/getDefinition?names=thing.doc&relativeTo=doctest { "missingDefinitions": [], "termDefinitions": { "#t9qfdoiuskj4n9go8cftj1r83s43s3o7sppafm5vr0bq5feieb7ap0cie5ed2qsf9g3ig448vffhnajinq81pnnkila1jp2epa7f26o": { - "bestTermName": "thing.doc", + "bestTermName": "doctest.thing.doc", "defnTermTag": "Doc", "signature": [ { @@ -355,10 +355,10 @@ GET /api/non-project-code/getDefinition?names=thing.doc&relativeTo=doctest "contents": [ { "annotation": { - "contents": "thing.doc", + "contents": "doctest.thing.doc", "tag": "HashQualifier" }, - "segment": "thing.doc" + "segment": "doctest.thing.doc" }, { "annotation": { @@ -383,10 +383,10 @@ GET /api/non-project-code/getDefinition?names=thing.doc&relativeTo=doctest }, { "annotation": { - "contents": "thing.doc", + "contents": "doctest.thing.doc", "tag": "HashQualifier" }, - "segment": "thing.doc" + "segment": "doctest.thing.doc" }, { "annotation": { @@ -467,7 +467,7 @@ GET /api/non-project-code/getDefinition?names=thing.doc&relativeTo=doctest }, "termDocs": [ [ - "thing.doc", + "doctest.thing.doc", "#t9qfdoiuskj4n9go8cftj1r83s43s3o7sppafm5vr0bq5feieb7ap0cie5ed2qsf9g3ig448vffhnajinq81pnnkila1jp2epa7f26o", { "contents": [ @@ -501,7 +501,7 @@ GET /api/non-project-code/getDefinition?names=thing.doc&relativeTo=doctest ] ], "termNames": [ - "thing.doc" + "doctest.thing.doc" ] } }, diff --git a/unison-src/transcripts/api-list-projects-branches.md b/unison-src/transcripts/api-list-projects-branches.md index 111489cf9..872cca22a 100644 --- a/unison-src/transcripts/api-list-projects-branches.md +++ b/unison-src/transcripts/api-list-projects-branches.md @@ -1,9 +1,9 @@ # List Projects And Branches Test ```ucm:hide -.> project.create-empty project-one -.> project.create-empty project-two -.> project.create-empty project-three +scratch/main> project.create-empty project-one +scratch/main> project.create-empty project-two +scratch/main> project.create-empty project-three project-one/main> branch branch-one project-one/main> branch branch-two project-one/main> branch branch-three diff --git a/unison-src/transcripts/api-list-projects-branches.output.md b/unison-src/transcripts/api-list-projects-branches.output.md index 1c12eea54..b3c09895d 100644 --- a/unison-src/transcripts/api-list-projects-branches.output.md +++ b/unison-src/transcripts/api-list-projects-branches.output.md @@ -12,6 +12,9 @@ GET /api/projects }, { "projectName": "project-two" + }, + { + "projectName": "scratch" } ] -- Should list projects starting with project-t diff --git a/unison-src/transcripts/api-namespace-details.md b/unison-src/transcripts/api-namespace-details.md index 0cfc7a835..2d50bdae9 100644 --- a/unison-src/transcripts/api-namespace-details.md +++ b/unison-src/transcripts/api-namespace-details.md @@ -1,7 +1,7 @@ # Namespace Details Test ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison @@ -14,10 +14,10 @@ Here's a *README*! ``` ```ucm -.> add +scratch/main> add ``` ```api -- Should find names by suffix -GET /api/non-project-code/namespaces/nested.names +GET /api/projects/scratch/branches/main/namespaces/nested.names ``` diff --git a/unison-src/transcripts/api-namespace-details.output.md b/unison-src/transcripts/api-namespace-details.output.md index 80d1d6ae0..0cdf2e88b 100644 --- a/unison-src/transcripts/api-namespace-details.output.md +++ b/unison-src/transcripts/api-namespace-details.output.md @@ -25,7 +25,7 @@ Here's a *README*! ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -36,7 +36,7 @@ Here's a *README*! ``` ```api -- Should find names by suffix -GET /api/non-project-code/namespaces/nested.names +GET /api/projects/scratch/branches/main/namespaces/nested.names { "fqn": "nested.names", "hash": "#6tnmlu9knsce0u2991u6fvcmf4v44fdf0aiqtmnq7mjj0gi5sephg3lf12iv3odr5rc7vlgq75ciborrd3625c701bdmdomia2gcm3o", diff --git a/unison-src/transcripts/api-namespace-list.md b/unison-src/transcripts/api-namespace-list.md index 717607269..c3dbbeed1 100644 --- a/unison-src/transcripts/api-namespace-list.md +++ b/unison-src/transcripts/api-namespace-list.md @@ -1,7 +1,7 @@ # Namespace list api ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison @@ -12,11 +12,11 @@ nested.names.readme = {{ I'm a readme! }} ``` ```ucm -.> add +scratch/main> add ``` ```api -GET /api/non-project-code/list?namespace=nested.names +GET /api/projects/scratch/branches/main/list?namespace=nested.names -GET /api/non-project-code/list?namespace=names&relativeTo=nested +GET /api/projects/scratch/branches/main/list?namespace=names&relativeTo=nested ``` diff --git a/unison-src/transcripts/api-namespace-list.output.md b/unison-src/transcripts/api-namespace-list.output.md index 0ef32d194..4219aa191 100644 --- a/unison-src/transcripts/api-namespace-list.output.md +++ b/unison-src/transcripts/api-namespace-list.output.md @@ -23,7 +23,7 @@ nested.names.readme = {{ I'm a readme! }} ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -33,7 +33,7 @@ nested.names.readme = {{ I'm a readme! }} ``` ```api -GET /api/non-project-code/list?namespace=nested.names +GET /api/projects/scratch/branches/main/list?namespace=nested.names { "namespaceListingChildren": [ { @@ -82,7 +82,7 @@ GET /api/non-project-code/list?namespace=nested.names "namespaceListingFQN": "nested.names", "namespaceListingHash": "#oms19b4f9s3c8tb5skeb8jii95ij35n3hdg038pu6rv5b0fikqe4gd7lnu6a1i6aq5tdh2opdo4s0sfrupvk6vfkr9lf0n752gbl8o0" } -GET /api/non-project-code/list?namespace=names&relativeTo=nested +GET /api/projects/scratch/branches/main/list?namespace=names&relativeTo=nested { "namespaceListingChildren": [ { diff --git a/unison-src/transcripts/api-summaries.md b/unison-src/transcripts/api-summaries.md index cf473e778..6bbc793a9 100644 --- a/unison-src/transcripts/api-summaries.md +++ b/unison-src/transcripts/api-summaries.md @@ -1,7 +1,7 @@ # Definition Summary APIs ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` @@ -25,56 +25,56 @@ structural ability Stream s where ``` ```ucm:hide -.> add -.> alias.type ##Nat Nat -.> alias.term ##IO.putBytes.impl.v3 putBytesImpl +scratch/main> add +scratch/main> alias.type ##Nat Nat +scratch/main> alias.term ##IO.putBytes.impl.v3 putBytesImpl ``` ## Term Summary APIs ```api -- term -GET /api/non-project-code/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat -- term without name uses hash -GET /api/non-project-code/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary -- doc -GET /api/non-project-code/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo/summary?name=doc +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo/summary?name=doc -- test -GET /api/non-project-code/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8/summary?name=mytest +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8/summary?name=mytest -- function -GET /api/non-project-code/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o/summary?name=func +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o/summary?name=func -- constructor -GET /api/non-project-code/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0@d0/summary?name=Thing.This +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0@d0/summary?name=Thing.This -- Long type signature -GET /api/non-project-code/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?name=funcWithLongType +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?name=funcWithLongType -- Long type signature with render width -GET /api/non-project-code/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?renderWidth=20&name=funcWithLongType +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?renderWidth=20&name=funcWithLongType -- Builtin Term -GET /api/non-project-code/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summary?name=putBytesImpl +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summary?name=putBytesImpl ``` ## Type Summary APIs ```api -- data -GET /api/non-project-code/definitions/types/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0/summary?name=Thing +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0/summary?name=Thing -- data with type args -GET /api/non-project-code/definitions/types/by-hash/@nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg/summary?name=Maybe +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg/summary?name=Maybe -- ability -GET /api/non-project-code/definitions/types/by-hash/@rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8/summary?name=Stream +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8/summary?name=Stream -- builtin type -GET /api/non-project-code/definitions/types/by-hash/@@Nat/summary?name=Nat +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@@Nat/summary?name=Nat ``` diff --git a/unison-src/transcripts/api-summaries.output.md b/unison-src/transcripts/api-summaries.output.md index cc5a9fcea..e9f93e624 100644 --- a/unison-src/transcripts/api-summaries.output.md +++ b/unison-src/transcripts/api-summaries.output.md @@ -23,7 +23,7 @@ structural ability Stream s where ```api -- term -GET /api/non-project-code/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary?name=nat { "displayName": "nat", "hash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8", @@ -42,7 +42,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sq "tag": "Plain" } -- term without name uses hash -GET /api/non-project-code/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8/summary { "displayName": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8", "hash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8", @@ -61,7 +61,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@qkhkl0n238s1eqibd1ecb8605sq "tag": "Plain" } -- doc -GET /api/non-project-code/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo/summary?name=doc +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo/summary?name=doc { "displayName": "doc", "hash": "#icfnhas71n8q5rm7rmpe51hh7bltsr7rb4lv7qadc4cbsifu1mhonlqj2d7836iar2ptc648q9p4u7hf40ijvld574421b6u8gpu0lo", @@ -80,7 +80,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@icfnhas71n8q5rm7rmpe51hh7bl "tag": "Doc" } -- test -GET /api/non-project-code/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8/summary?name=mytest +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8/summary?name=mytest { "displayName": "mytest", "hash": "#u17p9803hdibisou6rlr1sjbccdossgh7vtkd03ovlvnsl2n91lq94sqhughc62tnrual2jlrfk922sebp4nm22o7m5u9j40emft8r8", @@ -111,7 +111,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@u17p9803hdibisou6rlr1sjbccd "tag": "Test" } -- function -GET /api/non-project-code/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o/summary?name=func +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o/summary?name=func { "displayName": "func", "hash": "#6ee6j48hk3eovokflkgbmpbfr3oqj4hedqn8ocg3i4i0ko8j7nls7njjirmnh4k2bg8h95seaot798uuloqk62u2ttiqoceulkbmq2o", @@ -151,7 +151,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@6ee6j48hk3eovokflkgbmpbfr3o "tag": "Plain" } -- constructor -GET /api/non-project-code/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0@d0/summary?name=Thing.This +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0@d0/summary?name=Thing.This { "displayName": "Thing.This", "hash": "#altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0#0", @@ -191,7 +191,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@altimqs66j3dh94dpab5pg7j5ad "tag": "DataConstructor" } -- Long type signature -GET /api/non-project-code/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?name=funcWithLongType +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?name=funcWithLongType { "displayName": "funcWithLongType", "hash": "#ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8", @@ -378,7 +378,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59tton "tag": "Plain" } -- Long type signature with render width -GET /api/non-project-code/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?renderWidth=20&name=funcWithLongType +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8/summary?renderWidth=20&name=funcWithLongType { "displayName": "funcWithLongType", "hash": "#ieskgcjjvuegpecq9pbha59ttonke7pf31keeq0jlh31ijkfq00e06fdi36ae90u24pjva6ucqdbedropjgi3g3b75nu76ll5ls8ke8", @@ -565,7 +565,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@ieskgcjjvuegpecq9pbha59tton "tag": "Plain" } -- Builtin Term -GET /api/non-project-code/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summary?name=putBytesImpl +GET /api/projects/scratch/branches/main/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summary?name=putBytesImpl { "displayName": "putBytesImpl", "hash": "##IO.putBytes.impl.v3", @@ -671,7 +671,7 @@ GET /api/non-project-code/definitions/terms/by-hash/@@IO.putBytes.impl.v3/summar ```api -- data -GET /api/non-project-code/definitions/types/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0/summary?name=Thing +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0/summary?name=Thing { "displayName": "Thing", "hash": "#altimqs66j3dh94dpab5pg7j5adjrndq61n803j7fg0v0ohdiut6or66bu1fiongpd45s5euiuo8ru47b928aqv8osln1ikdeg05hq0", @@ -710,7 +710,7 @@ GET /api/non-project-code/definitions/types/by-hash/@altimqs66j3dh94dpab5pg7j5ad "tag": "Data" } -- data with type args -GET /api/non-project-code/definitions/types/by-hash/@nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg/summary?name=Maybe +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg/summary?name=Maybe { "displayName": "Maybe", "hash": "#nirp5os0q69o4e1u9p3t6mmq6l6otluefi3ksm7dhm0diidjvkkgl8o9bvnflbj0sanuvdusf34f1qrins3ktcaglpcqv9oums2slsg", @@ -759,7 +759,7 @@ GET /api/non-project-code/definitions/types/by-hash/@nirp5os0q69o4e1u9p3t6mmq6l6 "tag": "Data" } -- ability -GET /api/non-project-code/definitions/types/by-hash/@rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8/summary?name=Stream +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8/summary?name=Stream { "displayName": "Stream", "hash": "#rfi1v9429f9qluv533l2iba77aadttilrpmnhljfapfnfa6sru2nr8ibpqvib9nc4s4nb9s1as45upsfqfqe6ivqi2p82b2vd866it8", @@ -808,7 +808,7 @@ GET /api/non-project-code/definitions/types/by-hash/@rfi1v9429f9qluv533l2iba77aa "tag": "Ability" } -- builtin type -GET /api/non-project-code/definitions/types/by-hash/@@Nat/summary?name=Nat +GET /api/projects/scratch/branches/main/definitions/types/by-hash/@@Nat/summary?name=Nat { "displayName": "Nat", "hash": "##Nat", diff --git a/unison-src/transcripts/block-on-required-update.md b/unison-src/transcripts/block-on-required-update.md index 1027188b0..3b339e6fe 100644 --- a/unison-src/transcripts/block-on-required-update.md +++ b/unison-src/transcripts/block-on-required-update.md @@ -3,7 +3,7 @@ Should block an `add` if it requires an update on an in-file dependency. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -11,7 +11,7 @@ x = 1 ``` ```ucm -.> add +scratch/main> add ``` Update `x`, and add a new `y` which depends on the update @@ -24,5 +24,5 @@ y = x + 1 Try to add only the new `y`. This should fail because it requires an update to `x`, but we only ran an 'add'. ```ucm:error -.> add y +scratch/main> add y ``` diff --git a/unison-src/transcripts/block-on-required-update.output.md b/unison-src/transcripts/block-on-required-update.output.md index 254a281e8..0935b7317 100644 --- a/unison-src/transcripts/block-on-required-update.output.md +++ b/unison-src/transcripts/block-on-required-update.output.md @@ -20,7 +20,7 @@ x = 1 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -55,7 +55,7 @@ y = x + 1 Try to add only the new `y`. This should fail because it requires an update to `x`, but we only ran an 'add'. ```ucm -.> add y +scratch/main> add y x These definitions failed: diff --git a/unison-src/transcripts/blocks.md b/unison-src/transcripts/blocks.md index bac7ef187..b89ab4585 100644 --- a/unison-src/transcripts/blocks.md +++ b/unison-src/transcripts/blocks.md @@ -1,7 +1,7 @@ ## Blocks and scoping ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ### Names introduced by a block shadow names introduced in outer scopes diff --git a/unison-src/transcripts/boolean-op-pretty-print-2819.md b/unison-src/transcripts/boolean-op-pretty-print-2819.md index efdf493e9..b788c7833 100644 --- a/unison-src/transcripts/boolean-op-pretty-print-2819.md +++ b/unison-src/transcripts/boolean-op-pretty-print-2819.md @@ -1,7 +1,7 @@ Regression test for https://github.com/unisonweb/unison/pull/2819 ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -12,7 +12,7 @@ hangExample = ``` ```ucm -.> add -.> view hangExample +scratch/main> add +scratch/main> view hangExample ``` diff --git a/unison-src/transcripts/boolean-op-pretty-print-2819.output.md b/unison-src/transcripts/boolean-op-pretty-print-2819.output.md index 690b9fdc6..48fbfecf6 100644 --- a/unison-src/transcripts/boolean-op-pretty-print-2819.output.md +++ b/unison-src/transcripts/boolean-op-pretty-print-2819.output.md @@ -21,13 +21,13 @@ hangExample = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: hangExample : Boolean -.> view hangExample +scratch/main> view hangExample hangExample : Boolean hangExample = diff --git a/unison-src/transcripts/branch-command.md b/unison-src/transcripts/branch-command.md index 4b1636be4..d48e3c259 100644 --- a/unison-src/transcripts/branch-command.md +++ b/unison-src/transcripts/branch-command.md @@ -1,25 +1,25 @@ The `branch` command creates a new branch. ```ucm:hide -.> project.create-empty foo -.> project.create-empty bar +scratch/main> project.create-empty foo +scratch/main> project.create-empty bar ``` -First, we'll just create a loose code namespace with a term in it for later. +First, we'll create a term to include in the branches. ```unison:hide someterm = 18 ``` ```ucm -.some.loose.code.lib> builtins.merge -.some.loose.code> add +scratch/main> builtins.merge lib.builtins +scratch/main> add ``` Now, the `branch` demo: `branch` can create a branch from a different branch in the same project, from a different branch in a different -project, or from loose code. It can also create an empty branch. +project. It can also create an empty branch. ```ucm foo/main> branch topic1 @@ -33,22 +33,17 @@ foo/main> branch /main /topic8 foo/main> branch /main foo/topic9 foo/main> branch foo/main topic10 foo/main> branch foo/main /topic11 -.> branch foo/main foo/topic12 +scratch/main> branch foo/main foo/topic12 foo/main> branch bar/topic bar/main> branch foo/main topic2 bar/main> branch foo/main /topic3 -.> branch foo/main bar/topic4 - -.some.loose.code> branch foo/topic13 -foo/main> branch .some.loose.code topic14 -foo/main> branch .some.loose.code /topic15 -.> branch .some.loose.code foo/topic16 +scratch/main> branch foo/main bar/topic4 foo/main> branch.empty empty1 foo/main> branch.empty /empty2 foo/main> branch.empty foo/empty3 -.> branch.empty foo/empty4 +scratch/main> branch.empty foo/empty4 ``` The `branch` command can create branches named `releases/drafts/*` (because why not). diff --git a/unison-src/transcripts/branch-command.output.md b/unison-src/transcripts/branch-command.output.md index c074134bb..28dd680d5 100644 --- a/unison-src/transcripts/branch-command.output.md +++ b/unison-src/transcripts/branch-command.output.md @@ -1,19 +1,17 @@ The `branch` command creates a new branch. -First, we'll just create a loose code namespace with a term in it for later. +First, we'll create a term to include in the branches. ```unison someterm = 18 ``` ```ucm - ☝️ The namespace .some.loose.code.lib is empty. - -.some.loose.code.lib> builtins.merge +scratch/main> builtins.merge lib.builtins Done. -.some.loose.code> add +scratch/main> add ⍟ I've added these definitions: @@ -23,7 +21,7 @@ someterm = 18 Now, the `branch` demo: `branch` can create a branch from a different branch in the same project, from a different branch in a different -project, or from loose code. It can also create an empty branch. +project. It can also create an empty branch. ```ucm foo/main> branch topic1 @@ -103,7 +101,7 @@ foo/main> branch foo/main /topic11 Tip: To merge your work back into the main branch, first `switch /main` then `merge /topic11`. -.> branch foo/main foo/topic12 +scratch/main> branch foo/main foo/topic12 Done. I've created the topic12 branch based off of main. @@ -122,30 +120,10 @@ bar/main> branch foo/main /topic3 Done. I've created the bar/topic3 branch based off foo/main. -.> branch foo/main bar/topic4 +scratch/main> branch foo/main bar/topic4 Done. I've created the bar/topic4 branch based off foo/main. -.some.loose.code> branch foo/topic13 - - Done. I've created the foo/topic13 branch from the namespace - .some.loose.code. - -foo/main> branch .some.loose.code topic14 - - Done. I've created the foo/topic14 branch from the namespace - .some.loose.code. - -foo/main> branch .some.loose.code /topic15 - - Done. I've created the foo/topic15 branch from the namespace - .some.loose.code. - -.> branch .some.loose.code foo/topic16 - - Done. I've created the foo/topic16 branch from the namespace - .some.loose.code. - foo/main> branch.empty empty1 Done. I've created an empty branch foo/empty1. @@ -164,7 +142,7 @@ foo/main> branch.empty foo/empty3 Tip: Use `merge /somebranch` to initialize this branch. -.> branch.empty foo/empty4 +scratch/main> branch.empty foo/empty4 Done. I've created an empty branch foo/empty4. diff --git a/unison-src/transcripts/branch-relative-path.md b/unison-src/transcripts/branch-relative-path.md index 8414db2f1..74298f4b2 100644 --- a/unison-src/transcripts/branch-relative-path.md +++ b/unison-src/transcripts/branch-relative-path.md @@ -1,7 +1,7 @@ ```ucm:hide -.> builtins.merge -.> project.create-empty p0 -.> project.create-empty p1 +scratch/main> builtins.merge +scratch/main> project.create-empty p0 +scratch/main> project.create-empty p1 ``` ```unison diff --git a/unison-src/transcripts/bug-fix-4354.md b/unison-src/transcripts/bug-fix-4354.md index c1d603258..1ea7f595d 100644 --- a/unison-src/transcripts/bug-fix-4354.md +++ b/unison-src/transcripts/bug-fix-4354.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/builtins-merge.md b/unison-src/transcripts/builtins-merge.md index 28bfb426c..942dd4b0d 100644 --- a/unison-src/transcripts/builtins-merge.md +++ b/unison-src/transcripts/builtins-merge.md @@ -1,6 +1,6 @@ -The `builtins.merge` command adds the known builtins to a `builtin` subnamespace within the current namespace. +The `builtins.merge` command adds the known builtins to the specified subnamespace within the current namespace. ```ucm -.tmp> builtins.merge -.tmp> ls builtin +scratch/main> builtins.merge builtins +scratch/main> ls builtins ``` diff --git a/unison-src/transcripts/builtins-merge.output.md b/unison-src/transcripts/builtins-merge.output.md index 7bcf4910e..b79bdab58 100644 --- a/unison-src/transcripts/builtins-merge.output.md +++ b/unison-src/transcripts/builtins-merge.output.md @@ -1,13 +1,11 @@ -The `builtins.merge` command adds the known builtins to a `builtin` subnamespace within the current namespace. +The `builtins.merge` command adds the known builtins to the specified subnamespace within the current namespace. ```ucm - ☝️ The namespace .tmp is empty. - -.tmp> builtins.merge +scratch/main> builtins.merge builtins Done. -.tmp> ls builtin +scratch/main> ls builtins 1. Any (builtin type) 2. Any/ (2 terms) diff --git a/unison-src/transcripts/builtins.md b/unison-src/transcripts/builtins.md index ab854be39..6834b85eb 100644 --- a/unison-src/transcripts/builtins.md +++ b/unison-src/transcripts/builtins.md @@ -1,12 +1,12 @@ # Unit tests for builtin functions ```ucm:hide -.> builtins.mergeio -.> load unison-src/transcripts-using-base/base.u -.> add +scratch/main> builtins.mergeio +scratch/main> load unison-src/transcripts-using-base/base.u +scratch/main> add ``` -This transcript defines unit tests for builtin functions. There's a single `.> test` execution at the end that will fail the transcript with a nice report if any of the tests fail. +This transcript defines unit tests for builtin functions. There's a single `scratch/main> test` execution at the end that will fail the transcript with a nice report if any of the tests fail. ## `Int` functions @@ -88,7 +88,7 @@ test> Int.tests.conversions = ``` ```ucm:hide -.> add +scratch/main> add ``` ## `Nat` functions @@ -163,7 +163,7 @@ test> Nat.tests.conversions = ``` ```ucm:hide -.> add +scratch/main> add ``` ## `Boolean` functions @@ -190,7 +190,7 @@ test> Boolean.tests.notTable = ``` ```ucm:hide -.> add +scratch/main> add ``` ## `Text` functions @@ -288,7 +288,7 @@ test> Text.tests.indexOfEmoji = ``` ```ucm:hide -.> add +scratch/main> add ``` ## `Bytes` functions @@ -352,7 +352,7 @@ test> Bytes.tests.indexOf = ``` ```ucm:hide -.> add +scratch/main> add ``` ## `List` comparison @@ -371,7 +371,7 @@ test> checks [ ``` ```ucm:hide -.> add +scratch/main> add ``` Other list functions @@ -392,7 +392,7 @@ test> Any.test2 = checks [(not (Any "hi" == Any 42))] ``` ```ucm:hide -.> add +scratch/main> add ``` ## Sandboxing functions @@ -419,7 +419,7 @@ openFile] ``` ```ucm:hide -.> add +scratch/main> add ``` ```unison @@ -436,8 +436,8 @@ openFilesIO = do ``` ```ucm -.> add -.> io.test openFilesIO +scratch/main> add +scratch/main> io.test openFilesIO ``` ## Universal hash functions @@ -450,7 +450,7 @@ test> Universal.murmurHash.tests = checks [Universal.murmurHash [1,2,3] == Unive ``` ```ucm:hide -.> add +scratch/main> add ``` ## Run the tests @@ -458,5 +458,5 @@ test> Universal.murmurHash.tests = checks [Universal.murmurHash [1,2,3] == Unive Now that all the tests have been added to the codebase, let's view the test report. This will fail the transcript (with a nice message) if any of the tests are failing. ```ucm -.> test +scratch/main> test ``` diff --git a/unison-src/transcripts/builtins.output.md b/unison-src/transcripts/builtins.output.md index c654a69dd..4f8967ae0 100644 --- a/unison-src/transcripts/builtins.output.md +++ b/unison-src/transcripts/builtins.output.md @@ -1,6 +1,6 @@ # Unit tests for builtin functions -This transcript defines unit tests for builtin functions. There's a single `.> test` execution at the end that will fail the transcript with a nice report if any of the tests fail. +This transcript defines unit tests for builtin functions. There's a single `scratch/main> test` execution at the end that will fail the transcript with a nice report if any of the tests fail. ## `Int` functions @@ -480,13 +480,13 @@ openFilesIO = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: openFilesIO : '{IO} [Result] -.> io.test openFilesIO +scratch/main> io.test openFilesIO New test results: @@ -535,7 +535,7 @@ test> Universal.murmurHash.tests = checks [Universal.murmurHash [1,2,3] == Unive Now that all the tests have been added to the codebase, let's view the test report. This will fail the transcript (with a nice message) if any of the tests are failing. ```ucm -.> test +scratch/main> test Cached test results (`help testcache` to learn more) diff --git a/unison-src/transcripts/bytesFromList.md b/unison-src/transcripts/bytesFromList.md index 9da15329f..1abb99879 100644 --- a/unison-src/transcripts/bytesFromList.md +++ b/unison-src/transcripts/bytesFromList.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This should render as `Bytes.fromList [1,2,3,4]`, not `##Bytes.fromSequence [1,2,3,4]`: diff --git a/unison-src/transcripts/check763.md b/unison-src/transcripts/check763.md index 3bb162b34..8b3204514 100644 --- a/unison-src/transcripts/check763.md +++ b/unison-src/transcripts/check763.md @@ -1,7 +1,7 @@ Regression test for https://github.com/unisonweb/unison/issues/763 ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -10,8 +10,8 @@ Regression test for https://github.com/unisonweb/unison/issues/763 ``` ```ucm -.> add -.> move.term +-+ boppitybeep -.> move.term boppitybeep +-+ +scratch/main> add +scratch/main> move.term +-+ boppitybeep +scratch/main> move.term boppitybeep +-+ ``` diff --git a/unison-src/transcripts/check763.output.md b/unison-src/transcripts/check763.output.md index b8421509d..fe50b6834 100644 --- a/unison-src/transcripts/check763.output.md +++ b/unison-src/transcripts/check763.output.md @@ -19,17 +19,17 @@ Regression test for https://github.com/unisonweb/unison/issues/763 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: +-+ : Nat -> Nat -> Nat -.> move.term +-+ boppitybeep +scratch/main> move.term +-+ boppitybeep Done. -.> move.term boppitybeep +-+ +scratch/main> move.term boppitybeep +-+ Done. diff --git a/unison-src/transcripts/check873.md b/unison-src/transcripts/check873.md index 714518628..b70937821 100644 --- a/unison-src/transcripts/check873.md +++ b/unison-src/transcripts/check873.md @@ -1,7 +1,7 @@ See [this ticket](https://github.com/unisonweb/unison/issues/873); the point being, this shouldn't crash the runtime. :) ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -9,7 +9,7 @@ See [this ticket](https://github.com/unisonweb/unison/issues/873); the point bei ``` ```ucm -.> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts/check873.output.md b/unison-src/transcripts/check873.output.md index 289c592f3..5f21cec20 100644 --- a/unison-src/transcripts/check873.output.md +++ b/unison-src/transcripts/check873.output.md @@ -18,7 +18,7 @@ See [this ticket](https://github.com/unisonweb/unison/issues/873); the point bei ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/constructor-applied-to-unit.md b/unison-src/transcripts/constructor-applied-to-unit.md index df1341aa5..fc598a883 100644 --- a/unison-src/transcripts/constructor-applied-to-unit.md +++ b/unison-src/transcripts/constructor-applied-to-unit.md @@ -1,6 +1,6 @@ ```ucm:hide -.> alias.type ##Nat Nat -.> alias.term ##Any.Any Any +scratch/main> alias.type ##Nat Nat +scratch/main> alias.term ##Any.Any Any ``` ```unison diff --git a/unison-src/transcripts/contrabilities.md b/unison-src/transcripts/contrabilities.md index 795ec1556..5d1fdcb64 100644 --- a/unison-src/transcripts/contrabilities.md +++ b/unison-src/transcripts/contrabilities.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/create-author.md b/unison-src/transcripts/create-author.md index d9a39c735..af0655866 100644 --- a/unison-src/transcripts/create-author.md +++ b/unison-src/transcripts/create-author.md @@ -1,10 +1,10 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` Demonstrating `create.author`: ```ucm -.foo> create.author alicecoder "Alice McGee" -.foo> view 2 +scratch/main> create.author alicecoder "Alice McGee" +scratch/main> find alicecoder ``` diff --git a/unison-src/transcripts/create-author.output.md b/unison-src/transcripts/create-author.output.md index 3a5635947..a71fca7b1 100644 --- a/unison-src/transcripts/create-author.output.md +++ b/unison-src/transcripts/create-author.output.md @@ -1,22 +1,21 @@ Demonstrating `create.author`: ```ucm - ☝️ The namespace .foo is empty. - -.foo> create.author alicecoder "Alice McGee" +scratch/main> create.author alicecoder "Alice McGee" Added definitions: - 1. metadata.authors.alicecoder : #345f3nptqq - 2. metadata.copyrightHolders.alicecoder : #pgornst1pq - 3. metadata.authors.alicecoder.guid : #hqectlr3gt + 1. metadata.authors.alicecoder : Author + 2. metadata.copyrightHolders.alicecoder : CopyrightHolder + 3. metadata.authors.alicecoder.guid : GUID Tip: Add License values for alicecoder under metadata. -.foo> view 2 +scratch/main> find alicecoder - .foo.metadata.copyrightHolders.alicecoder : CopyrightHolder - .foo.metadata.copyrightHolders.alicecoder = - CopyrightHolder alicecoder.guid "Alice McGee" + 1. metadata.authors.alicecoder : Author + 2. metadata.copyrightHolders.alicecoder : CopyrightHolder + 3. metadata.authors.alicecoder.guid : GUID + ``` diff --git a/unison-src/transcripts/cycle-update-1.md b/unison-src/transcripts/cycle-update-1.md index 5294f2e49..b60bc763e 100644 --- a/unison-src/transcripts/cycle-update-1.md +++ b/unison-src/transcripts/cycle-update-1.md @@ -1,7 +1,7 @@ Update a member of a cycle, but retain the cycle. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -13,7 +13,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -22,6 +22,6 @@ ping _ = !pong + 3 ``` ```ucm -.> update -.> view ping pong +scratch/main> update +scratch/main> view ping pong ``` diff --git a/unison-src/transcripts/cycle-update-1.output.md b/unison-src/transcripts/cycle-update-1.output.md index b5f381b73..25cd6f398 100644 --- a/unison-src/transcripts/cycle-update-1.output.md +++ b/unison-src/transcripts/cycle-update-1.output.md @@ -23,7 +23,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,7 +51,7 @@ ping _ = !pong + 3 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -62,7 +62,7 @@ ping _ = !pong + 3 Done. -.> view ping pong +scratch/main> view ping pong ping : 'Nat ping _ = diff --git a/unison-src/transcripts/cycle-update-2.md b/unison-src/transcripts/cycle-update-2.md index bd8c6edc1..0feb63afc 100644 --- a/unison-src/transcripts/cycle-update-2.md +++ b/unison-src/transcripts/cycle-update-2.md @@ -1,7 +1,7 @@ Update a member of a cycle with a type-preserving update, but sever the cycle. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -13,7 +13,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -22,6 +22,6 @@ ping _ = 3 ``` ```ucm -.> update -.> view ping pong +scratch/main> update +scratch/main> view ping pong ``` diff --git a/unison-src/transcripts/cycle-update-2.output.md b/unison-src/transcripts/cycle-update-2.output.md index 4d9639a9c..89e740faa 100644 --- a/unison-src/transcripts/cycle-update-2.output.md +++ b/unison-src/transcripts/cycle-update-2.output.md @@ -23,7 +23,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,7 +51,7 @@ ping _ = 3 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -62,7 +62,7 @@ ping _ = 3 Done. -.> view ping pong +scratch/main> view ping pong ping : 'Nat ping _ = 3 diff --git a/unison-src/transcripts/cycle-update-3.md b/unison-src/transcripts/cycle-update-3.md index dfcd87305..b5e1e0555 100644 --- a/unison-src/transcripts/cycle-update-3.md +++ b/unison-src/transcripts/cycle-update-3.md @@ -1,7 +1,7 @@ Update a member of a cycle with a type-changing update, thus severing the cycle. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -13,7 +13,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -22,6 +22,6 @@ ping = 3 ``` ```ucm -.> update.old -.> view ping pong +scratch/main> update.old +scratch/main> view ping pong ``` diff --git a/unison-src/transcripts/cycle-update-3.output.md b/unison-src/transcripts/cycle-update-3.output.md index 281e389e6..f21e3fe9d 100644 --- a/unison-src/transcripts/cycle-update-3.output.md +++ b/unison-src/transcripts/cycle-update-3.output.md @@ -23,7 +23,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,13 +51,13 @@ ping = 3 ``` ```ucm -.> update.old +scratch/main> update.old ⍟ I've updated these names to your new definition: ping : Nat -.> view ping pong +scratch/main> view ping pong ping : Nat ping = 3 diff --git a/unison-src/transcripts/cycle-update-4.md b/unison-src/transcripts/cycle-update-4.md index d2bf98f69..ae389489b 100644 --- a/unison-src/transcripts/cycle-update-4.md +++ b/unison-src/transcripts/cycle-update-4.md @@ -1,7 +1,7 @@ `update` properly discovers and establishes new cycles. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -13,7 +13,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -25,6 +25,6 @@ clang _ = !pong + 3 ``` ```ucm -.> update.old ping -.> view ping pong clang +scratch/main> update.old ping +scratch/main> view ping pong clang ``` diff --git a/unison-src/transcripts/cycle-update-4.output.md b/unison-src/transcripts/cycle-update-4.output.md index d4b8b8030..0eb134f0f 100644 --- a/unison-src/transcripts/cycle-update-4.output.md +++ b/unison-src/transcripts/cycle-update-4.output.md @@ -23,7 +23,7 @@ pong _ = !ping + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -58,7 +58,7 @@ clang _ = !pong + 3 ``` ```ucm -.> update.old ping +scratch/main> update.old ping ⍟ I've added these definitions: @@ -69,7 +69,7 @@ clang _ = !pong + 3 ping : 'Nat pong : 'Nat -.> view ping pong clang +scratch/main> view ping pong clang clang : 'Nat clang _ = diff --git a/unison-src/transcripts/cycle-update-5.md b/unison-src/transcripts/cycle-update-5.md index c09a93c3d..60d283d55 100644 --- a/unison-src/transcripts/cycle-update-5.md +++ b/unison-src/transcripts/cycle-update-5.md @@ -1,7 +1,7 @@ Not yet working: properly updating nameless implicit terms. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -13,7 +13,7 @@ pong _ = !inner.ping + 2 ``` ```ucm -.> add +scratch/main> add ``` Here we queue up an update by saving in a namespace where `inner.ping` and `pong` both have names, but then apply the @@ -26,7 +26,7 @@ inner.ping _ = !pong + 3 ```ucm .inner> update.old -.> view inner.ping +scratch/main> view inner.ping ``` The bug here is that `inner.ping` still refers to `pong` by name. But if we properly identified the nameless (in the diff --git a/unison-src/transcripts/cycle-update-5.output.md b/unison-src/transcripts/cycle-update-5.output.md index 017d92b34..b6c1a0717 100644 --- a/unison-src/transcripts/cycle-update-5.output.md +++ b/unison-src/transcripts/cycle-update-5.output.md @@ -23,7 +23,7 @@ pong _ = !inner.ping + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -54,13 +54,15 @@ inner.ping _ = !pong + 3 ``` ```ucm + ☝️ The namespace .inner is empty. + .inner> update.old ⍟ I've added these definitions: inner.ping : '##Nat -.> view inner.ping +scratch/main> view inner.ping inner.ping : 'Nat inner.ping _ = diff --git a/unison-src/transcripts/debug-definitions.md b/unison-src/transcripts/debug-definitions.md index 471748691..0d10165f5 100644 --- a/unison-src/transcripts/debug-definitions.md +++ b/unison-src/transcripts/debug-definitions.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide @@ -17,12 +17,12 @@ ability Ask a where ``` ```ucm -.> add -.> debug.term.abt Nat.+ -.> debug.term.abt y -.> debug.term.abt Some -.> debug.term.abt ask -.> debug.type.abt Nat -.> debug.type.abt Optional -.> debug.type.abt Ask +scratch/main> add +scratch/main> debug.term.abt Nat.+ +scratch/main> debug.term.abt y +scratch/main> debug.term.abt Some +scratch/main> debug.term.abt ask +scratch/main> debug.type.abt Nat +scratch/main> debug.type.abt Optional +scratch/main> debug.type.abt Ask ``` diff --git a/unison-src/transcripts/debug-definitions.output.md b/unison-src/transcripts/debug-definitions.output.md index cb1b14d1a..37d6591e2 100644 --- a/unison-src/transcripts/debug-definitions.output.md +++ b/unison-src/transcripts/debug-definitions.output.md @@ -13,7 +13,7 @@ ability Ask a where ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -23,15 +23,15 @@ ability Ask a where x : Nat y : Nat -.> debug.term.abt Nat.+ +scratch/main> debug.term.abt Nat.+ Builtin term: ##Nat.+ -.> debug.term.abt y +scratch/main> debug.term.abt y (let Ref(ReferenceBuiltin "Nat.+") Ref(ReferenceDerived (Id "qpo3o788girkkbb43uf6ggqberfduhtnqbt7096eojlrp27jieco09mdasb7b0b06ej9hj60a00nnbbdo8he0b4e0m7vtopifiuhdig" 0)) 2 in (User "z". Ref(ReferenceBuiltin "Nat.+") (Var User "z") 10)):ReferenceBuiltin "Nat" -.> debug.term.abt Some +scratch/main> debug.term.abt Some Constructor #0 of the following type: DataDeclaration @@ -61,7 +61,7 @@ ability Ask a where ] } -.> debug.term.abt ask +scratch/main> debug.term.abt ask Constructor #0 of the following type: EffectDeclaration @@ -90,11 +90,11 @@ ability Ask a where } } -.> debug.type.abt Nat +scratch/main> debug.type.abt Nat Builtin type: ##Nat -.> debug.type.abt Optional +scratch/main> debug.type.abt Optional DataDeclaration { modifier = Structural @@ -123,7 +123,7 @@ ability Ask a where ] } -.> debug.type.abt Ask +scratch/main> debug.type.abt Ask EffectDeclaration { toDataDecl = DataDeclaration diff --git a/unison-src/transcripts/debug-name-diffs.md b/unison-src/transcripts/debug-name-diffs.md index 361142bf5..5d4970e59 100644 --- a/unison-src/transcripts/debug-name-diffs.md +++ b/unison-src/transcripts/debug-name-diffs.md @@ -10,10 +10,10 @@ structural type a.b.Baz = Boo ``` ```ucm -.> add -.> delete.term.verbose a.b.one -.> alias.term a.two a.newtwo -.> move.namespace a.x a.y -.> history -.> debug.name-diff 4 1 +scratch/main> add +scratch/main> delete.term.verbose a.b.one +scratch/main> alias.term a.two a.newtwo +scratch/main> move.namespace a.x a.y +scratch/main> history +scratch/main> debug.name-diff 4 1 ``` diff --git a/unison-src/transcripts/debug-name-diffs.output.md b/unison-src/transcripts/debug-name-diffs.output.md index ac6895c14..9d15bfe47 100644 --- a/unison-src/transcripts/debug-name-diffs.output.md +++ b/unison-src/transcripts/debug-name-diffs.output.md @@ -28,7 +28,7 @@ structural type a.b.Baz = Boo ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -39,7 +39,7 @@ structural type a.b.Baz = Boo a.x.four : ##Nat a.x.three : ##Nat -.> delete.term.verbose a.b.one +scratch/main> delete.term.verbose a.b.one Removed definitions: @@ -47,15 +47,15 @@ structural type a.b.Baz = Boo Tip: You can use `undo` or `reflog` to undo this change. -.> alias.term a.two a.newtwo +scratch/main> alias.term a.two a.newtwo Done. -.> move.namespace a.x a.y +scratch/main> move.namespace a.x a.y Done. -.> history +scratch/main> history Note: The most recent namespace hash is immediately below this message. @@ -90,7 +90,7 @@ structural type a.b.Baz = Boo □ 4. #gss5s88mo3 (start of history) -.> debug.name-diff 4 1 +scratch/main> debug.name-diff 4 1 Kind Name Change Ref Term a.newtwo Added #dcgdua2lj6upd1ah5v0qp09gjsej0d77d87fu6qn8e2qrssnlnmuinoio46hiu53magr7qn8vnqke8ndt0v76700o5u8gcvo7st28jg diff --git a/unison-src/transcripts/deep-names.md b/unison-src/transcripts/deep-names.md index 3487497cc..9d6695bc4 100644 --- a/unison-src/transcripts/deep-names.md +++ b/unison-src/transcripts/deep-names.md @@ -12,36 +12,42 @@ http.z = 8 ``` ```ucm:hide -.> add +scratch/main> add +scratch/main> branch /app1 +scratch/main> branch /app2 ``` Our `app1` project includes the text library twice and the http library twice as direct dependencies. ```ucm -.app1> fork .text lib.text_v1 -.app1> fork .text lib.text_v2 -.app1> fork .http lib.http_v3 -.app1> fork .http lib.http_v4 +scratch/app1> fork text lib.text_v1 +scratch/app1> fork text lib.text_v2 +scratch/app1> delete.namespace text +scratch/app1> fork http lib.http_v3 +scratch/app1> fork http lib.http_v4 +scratch/app1> delete.namespace http ``` As such, we see two copies of `a` and two copies of `x` via these direct dependencies. ```ucm -.app1> names a -.app1> names x +scratch/app1> names a +scratch/app1> names x ``` Our `app2` project includes the `http` library twice as direct dependencies, and once as an indirect dependency via `webutil`. It also includes the `text` library twice as indirect dependencies via `webutil` ```ucm -.app2> fork .http lib.http_v1 -.app2> fork .http lib.http_v2 -.app2> fork .text lib.webutil.lib.text_v1 -.app2> fork .text lib.webutil.lib.text_v2 -.app2> fork .http lib.webutil.lib.http +scratch/app2> fork http lib.http_v1 +scratch/app2> fork http lib.http_v2 +scratch/app2> fork text lib.webutil.lib.text_v1 +scratch/app2> fork text lib.webutil.lib.text_v2 +scratch/app2> fork http lib.webutil.lib.http +scratch/app2> delete.namespace http +scratch/app2> delete.namespace text ``` Now we see two copies of `x` via direct dependencies on `http`, and one copy of `a` via indirect dependency on `text` via `webutil`. We see neither the second indirect copy of `a` nor the indirect copy of `x` via webutil because we already have names for them. ```ucm -.app2> names a -.app2> names x +scratch/app2> names a +scratch/app2> names x ``` diff --git a/unison-src/transcripts/deep-names.output.md b/unison-src/transcripts/deep-names.output.md index 3b6637d8a..833ae613a 100644 --- a/unison-src/transcripts/deep-names.output.md +++ b/unison-src/transcripts/deep-names.output.md @@ -13,28 +13,34 @@ http.z = 8 Our `app1` project includes the text library twice and the http library twice as direct dependencies. ```ucm - ☝️ The namespace .app1 is empty. - -.app1> fork .text lib.text_v1 +scratch/app1> fork text lib.text_v1 Done. -.app1> fork .text lib.text_v2 +scratch/app1> fork text lib.text_v2 Done. -.app1> fork .http lib.http_v3 +scratch/app1> delete.namespace text Done. -.app1> fork .http lib.http_v4 +scratch/app1> fork http lib.http_v3 + + Done. + +scratch/app1> fork http lib.http_v4 + + Done. + +scratch/app1> delete.namespace http Done. ``` As such, we see two copies of `a` and two copies of `x` via these direct dependencies. ```ucm -.app1> names a +scratch/app1> names a Term Hash: #gjmq673r1v @@ -42,7 +48,7 @@ As such, we see two copies of `a` and two copies of `x` via these direct depende Tip: Use `names.global` to see more results. -.app1> names x +scratch/app1> names x Term Hash: #nsmc4p1ra4 @@ -54,25 +60,31 @@ As such, we see two copies of `a` and two copies of `x` via these direct depende Our `app2` project includes the `http` library twice as direct dependencies, and once as an indirect dependency via `webutil`. It also includes the `text` library twice as indirect dependencies via `webutil` ```ucm - ☝️ The namespace .app2 is empty. - -.app2> fork .http lib.http_v1 +scratch/app2> fork http lib.http_v1 Done. -.app2> fork .http lib.http_v2 +scratch/app2> fork http lib.http_v2 Done. -.app2> fork .text lib.webutil.lib.text_v1 +scratch/app2> fork text lib.webutil.lib.text_v1 Done. -.app2> fork .text lib.webutil.lib.text_v2 +scratch/app2> fork text lib.webutil.lib.text_v2 Done. -.app2> fork .http lib.webutil.lib.http +scratch/app2> fork http lib.webutil.lib.http + + Done. + +scratch/app2> delete.namespace http + + Done. + +scratch/app2> delete.namespace text Done. @@ -80,7 +92,7 @@ It also includes the `text` library twice as indirect dependencies via `webutil` Now we see two copies of `x` via direct dependencies on `http`, and one copy of `a` via indirect dependency on `text` via `webutil`. We see neither the second indirect copy of `a` nor the indirect copy of `x` via webutil because we already have names for them. ```ucm -.app2> names a +scratch/app2> names a Term Hash: #gjmq673r1v @@ -88,7 +100,7 @@ We see neither the second indirect copy of `a` nor the indirect copy of `x` via Tip: Use `names.global` to see more results. -.app2> names x +scratch/app2> names x Term Hash: #nsmc4p1ra4 diff --git a/unison-src/transcripts/delete-namespace.md b/unison-src/transcripts/delete-namespace.md index fe8f34630..5bbdda79e 100644 --- a/unison-src/transcripts/delete-namespace.md +++ b/unison-src/transcripts/delete-namespace.md @@ -1,7 +1,7 @@ # delete.namespace.force ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide @@ -15,47 +15,47 @@ dependents.usage2 = dependencies.term1 * dependencies.term2 ``` ```ucm:hide -.> add +scratch/main> add ``` Deleting a namespace with no external dependencies should succeed. ```ucm -.> delete.namespace no_dependencies +scratch/main> delete.namespace no_dependencies ``` Deleting a namespace with external dependencies should fail and list all dependents. ```ucm:error -.> delete.namespace dependencies +scratch/main> delete.namespace dependencies ``` Deleting a namespace with external dependencies should succeed when using `delete.namespace.force` ```ucm -.> delete.namespace.force dependencies +scratch/main> delete.namespace.force dependencies ``` I should be able to view an affected dependency by number ```ucm -.> view 2 +scratch/main> view 2 ``` Deleting the root namespace should require confirmation if not forced. ```ucm -.> delete.namespace . -.> delete.namespace . +scratch/main> delete.namespace . +scratch/main> delete.namespace . -- Should have an empty history -.> history . +scratch/main> history . ``` Deleting the root namespace shouldn't require confirmation if forced. ```ucm -.> delete.namespace.force . +scratch/main> delete.namespace.force . -- Should have an empty history -.> history . +scratch/main> history . ``` diff --git a/unison-src/transcripts/delete-namespace.output.md b/unison-src/transcripts/delete-namespace.output.md index e7c09cbae..563b98ad2 100644 --- a/unison-src/transcripts/delete-namespace.output.md +++ b/unison-src/transcripts/delete-namespace.output.md @@ -13,7 +13,7 @@ dependents.usage2 = dependencies.term1 * dependencies.term2 Deleting a namespace with no external dependencies should succeed. ```ucm -.> delete.namespace no_dependencies +scratch/main> delete.namespace no_dependencies Done. @@ -21,7 +21,7 @@ Deleting a namespace with no external dependencies should succeed. Deleting a namespace with external dependencies should fail and list all dependents. ```ucm -.> delete.namespace dependencies +scratch/main> delete.namespace dependencies ⚠️ @@ -42,7 +42,7 @@ Deleting a namespace with external dependencies should fail and list all depende Deleting a namespace with external dependencies should succeed when using `delete.namespace.force` ```ucm -.> delete.namespace.force dependencies +scratch/main> delete.namespace.force dependencies Done. @@ -62,7 +62,7 @@ Deleting a namespace with external dependencies should succeed when using `delet I should be able to view an affected dependency by number ```ucm -.> view 2 +scratch/main> view 2 dependents.usage2 : Nat dependents.usage2 = @@ -73,21 +73,21 @@ I should be able to view an affected dependency by number Deleting the root namespace should require confirmation if not forced. ```ucm -.> delete.namespace . +scratch/main> delete.namespace . ⚠️ Are you sure you want to clear away everything? You could use `project.create` to switch to a new project instead. -.> delete.namespace . +scratch/main> delete.namespace . Okay, I deleted everything except the history. Use `undo` to undo, or `builtins.merge` to restore the absolute basics to the current path. -- Should have an empty history -.> history . +scratch/main> history . ☝️ The namespace . is empty. @@ -95,14 +95,14 @@ Deleting the root namespace should require confirmation if not forced. Deleting the root namespace shouldn't require confirmation if forced. ```ucm -.> delete.namespace.force . +scratch/main> delete.namespace.force . Okay, I deleted everything except the history. Use `undo` to undo, or `builtins.merge` to restore the absolute basics to the current path. -- Should have an empty history -.> history . +scratch/main> history . ☝️ The namespace . is empty. diff --git a/unison-src/transcripts/delete-project-branch.md b/unison-src/transcripts/delete-project-branch.md index c84dc95cc..091e9fa71 100644 --- a/unison-src/transcripts/delete-project-branch.md +++ b/unison-src/transcripts/delete-project-branch.md @@ -17,7 +17,7 @@ You can precede the branch name by a project name. ```ucm foo/main> branch topic -.> delete.branch foo/topic +scratch/main> delete.branch foo/topic ``` You can delete the only branch in a project. diff --git a/unison-src/transcripts/delete-project-branch.output.md b/unison-src/transcripts/delete-project-branch.output.md index d4458e8be..84568c97d 100644 --- a/unison-src/transcripts/delete-project-branch.output.md +++ b/unison-src/transcripts/delete-project-branch.output.md @@ -35,9 +35,7 @@ foo/main> branch topic Tip: To merge your work back into the main branch, first `switch /main` then `merge /topic`. - ☝️ The namespace . is empty. - -.> delete.branch foo/topic +scratch/main> delete.branch foo/topic ``` You can delete the only branch in a project. diff --git a/unison-src/transcripts/delete-project.md b/unison-src/transcripts/delete-project.md index df31873fb..b317a9f31 100644 --- a/unison-src/transcripts/delete-project.md +++ b/unison-src/transcripts/delete-project.md @@ -1,9 +1,9 @@ # delete.project ```ucm -.> project.create-empty foo -.> project.create-empty bar -.> projects +scratch/main> project.create-empty foo +scratch/main> project.create-empty bar +scratch/main> projects foo/main> delete.project foo -.> projects +scratch/main> projects ``` diff --git a/unison-src/transcripts/delete-project.output.md b/unison-src/transcripts/delete-project.output.md index 18af51f9c..e2b974a9c 100644 --- a/unison-src/transcripts/delete-project.output.md +++ b/unison-src/transcripts/delete-project.output.md @@ -1,7 +1,7 @@ # delete.project ```ucm -.> project.create-empty foo +scratch/main> project.create-empty foo 🎉 I've created the project foo. @@ -17,9 +17,7 @@ 🎉 🥳 Happy coding! - ☝️ The namespace . is empty. - -.> project.create-empty bar +scratch/main> project.create-empty bar 🎉 I've created the project bar. @@ -35,17 +33,17 @@ 🎉 🥳 Happy coding! - ☝️ The namespace . is empty. - -.> projects +scratch/main> projects 1. bar 2. foo + 3. scratch foo/main> delete.project foo -.> projects +scratch/main> projects 1. bar + 2. scratch ``` diff --git a/unison-src/transcripts/delete-silent.md b/unison-src/transcripts/delete-silent.md index 33ec668de..5a5037e9f 100644 --- a/unison-src/transcripts/delete-silent.md +++ b/unison-src/transcripts/delete-silent.md @@ -1,5 +1,5 @@ ```ucm:error -.> delete foo +scratch/main> delete foo ``` ```unison:hide @@ -8,8 +8,8 @@ structural type Foo = Foo () ``` ```ucm -.> add -.> delete foo -.> delete.type Foo -.> delete.term Foo.Foo +scratch/main> add +scratch/main> delete foo +scratch/main> delete.type Foo +scratch/main> delete.term Foo.Foo ``` diff --git a/unison-src/transcripts/delete-silent.output.md b/unison-src/transcripts/delete-silent.output.md index 7ea6d420d..3ec5397fc 100644 --- a/unison-src/transcripts/delete-silent.output.md +++ b/unison-src/transcripts/delete-silent.output.md @@ -1,5 +1,5 @@ ```ucm -.> delete foo +scratch/main> delete foo ⚠️ @@ -13,22 +13,22 @@ structural type Foo = Foo () ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: structural type Foo foo : ##Nat -.> delete foo +scratch/main> delete foo Done. -.> delete.type Foo +scratch/main> delete.type Foo Done. -.> delete.term Foo.Foo +scratch/main> delete.term Foo.Foo Done. diff --git a/unison-src/transcripts/dependents-dependencies-debugfile.md b/unison-src/transcripts/dependents-dependencies-debugfile.md index 46ffce8d3..30692285e 100644 --- a/unison-src/transcripts/dependents-dependencies-debugfile.md +++ b/unison-src/transcripts/dependents-dependencies-debugfile.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ### `debug.file` @@ -18,7 +18,7 @@ inside.q x = x + p * p inside.r = d ``` ```ucm -.> debug.file +scratch/main> debug.file ``` This will help me make progress in some situations when UCM is being deficient or broken. @@ -26,13 +26,13 @@ This will help me make progress in some situations when UCM is being deficient o ### `dependents` / `dependencies` But wait, there's more. I can check the dependencies and dependents of a definition: ```ucm -.> add -.> dependents q -.> dependencies q -.> dependencies B -.> dependencies d -.> dependents d -.> +scratch/main> add +scratch/main> dependents q +scratch/main> dependencies q +scratch/main> dependencies B +scratch/main> dependencies d +scratch/main> dependents d +scratch/main> ``` We don't have an index for dependents of constructors, but iirc if you ask for that, it will show you dependents of the structural type that provided the constructor. diff --git a/unison-src/transcripts/dependents-dependencies-debugfile.output.md b/unison-src/transcripts/dependents-dependencies-debugfile.output.md index 413c7c210..90f3fefbc 100644 --- a/unison-src/transcripts/dependents-dependencies-debugfile.output.md +++ b/unison-src/transcripts/dependents-dependencies-debugfile.output.md @@ -15,7 +15,7 @@ inside.r = d ``` ```ucm -.> debug.file +scratch/main> debug.file type inside.M#h37a56c5ep type outside.A#6l6krl7n4l @@ -32,7 +32,7 @@ This will help me make progress in some situations when UCM is being deficient o ### `dependents` / `dependencies` But wait, there's more. I can check the dependencies and dependents of a definition: ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -45,11 +45,11 @@ But wait, there's more. I can check the dependencies and dependents of a defini outside.c : Nat outside.d : Boolean -.> dependents q +scratch/main> dependents q q has no dependents. -.> dependencies q +scratch/main> dependencies q Dependencies of: q @@ -66,7 +66,7 @@ But wait, there's more. I can check the dependencies and dependents of a defini Tip: Try `view 4` to see the source of any numbered item in the above list. -.> dependencies B +scratch/main> dependencies B Dependencies of: type B, B @@ -78,7 +78,7 @@ But wait, there's more. I can check the dependencies and dependents of a defini Tip: Try `view 2` to see the source of any numbered item in the above list. -.> dependencies d +scratch/main> dependencies d Dependencies of: d @@ -97,7 +97,7 @@ But wait, there's more. I can check the dependencies and dependents of a defini Tip: Try `view 6` to see the source of any numbered item in the above list. -.> dependents d +scratch/main> dependents d Dependents of: d diff --git a/unison-src/transcripts/destructuring-binds.md b/unison-src/transcripts/destructuring-binds.md index f9a1eef97..2c8cf5a77 100644 --- a/unison-src/transcripts/destructuring-binds.md +++ b/unison-src/transcripts/destructuring-binds.md @@ -1,7 +1,7 @@ # Destructuring binds ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Here's a couple examples: @@ -19,8 +19,8 @@ ex1 tup = ``` ```ucm -.> add -.> view ex0 ex1 +scratch/main> add +scratch/main> view ex0 ex1 ``` Notice that `ex0` is printed using the `cases` syntax (but `ex1` is not). The pretty-printer currently prefers the `cases` syntax if definition can be printed using either destructuring bind or `cases`. @@ -58,8 +58,8 @@ ex5a _ = match (99 + 1, "hi") with ``` ```ucm -.> add -.> view ex5 ex5a +scratch/main> add +scratch/main> view ex5 ex5a ``` Notice how it prints both an ordinary match. @@ -74,6 +74,6 @@ ex6 x = match x with For clarity, the pretty-printer leaves this alone, even though in theory it could be written `(x,y) = x; x + y`: ```ucm -.> add -.> view ex6 +scratch/main> add +scratch/main> view ex6 ``` diff --git a/unison-src/transcripts/destructuring-binds.output.md b/unison-src/transcripts/destructuring-binds.output.md index af097fc52..4185a71b9 100644 --- a/unison-src/transcripts/destructuring-binds.output.md +++ b/unison-src/transcripts/destructuring-binds.output.md @@ -29,14 +29,14 @@ ex1 tup = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: ex0 : Nat -> Nat ex1 : (a, b, (Nat, Nat)) -> Nat -.> view ex0 ex1 +scratch/main> view ex0 ex1 ex0 : Nat -> Nat ex0 n = @@ -131,14 +131,14 @@ ex5a _ = match (99 + 1, "hi") with ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: ex5 : 'Text ex5a : 'Text -.> view ex5 ex5a +scratch/main> view ex5 ex5a ex5 : 'Text ex5 _ = match 99 Nat.+ 1 with @@ -163,13 +163,13 @@ ex6 x = match x with For clarity, the pretty-printer leaves this alone, even though in theory it could be written `(x,y) = x; x + y`: ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: ex6 : (Nat, Nat) -> Nat -.> view ex6 +scratch/main> view ex6 ex6 : (Nat, Nat) -> Nat ex6 = cases (x, y) -> x Nat.+ y diff --git a/unison-src/transcripts/doc-formatting.md b/unison-src/transcripts/doc-formatting.md index 51f6c51bc..1f5a63808 100644 --- a/unison-src/transcripts/doc-formatting.md +++ b/unison-src/transcripts/doc-formatting.md @@ -3,7 +3,7 @@ This transcript explains a few minor details about doc parsing and pretty-printi Docs can be used as inline code comments. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -14,10 +14,10 @@ foo n = ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view foo +scratch/main> view foo ``` Note that `@` and `:]` must be escaped within docs. @@ -27,10 +27,10 @@ escaping = [: Docs look [: like \@this \:] :] ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view escaping +scratch/main> view escaping ``` (Alas you can't have `\@` or `\:]` in your doc, as there's currently no way to 'unescape' them.) @@ -46,10 +46,10 @@ commented = [: ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view commented +scratch/main> view commented ``` ### Indenting, and paragraph reflow @@ -64,10 +64,10 @@ doc1 = [: hi :] ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view doc1 +scratch/main> view doc1 ``` ```unison @@ -83,10 +83,10 @@ doc2 = [: hello ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view doc2 +scratch/main> view doc2 ``` ```unison @@ -105,10 +105,10 @@ Note that because of the special treatment of the first line mentioned above, wh ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view doc3 +scratch/main> view doc3 ``` ```unison @@ -120,10 +120,10 @@ doc4 = [: Here's another example of some paragraphs. ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view doc4 +scratch/main> view doc4 ``` ```unison @@ -137,10 +137,10 @@ doc5 = [: - foo ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view doc5 +scratch/main> view doc5 ``` ```unison @@ -153,10 +153,10 @@ doc6 = [: ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view doc6 +scratch/main> view doc6 ``` ### More testing @@ -168,10 +168,10 @@ empty = [::] expr = foo 1 ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view empty +scratch/main> view empty ``` ```unison @@ -214,10 +214,10 @@ para line lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolo :] ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view test1 +scratch/main> view test1 ``` ```unison @@ -226,10 +226,10 @@ reg1363 = [: `@List.take foo` bar baz :] ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view reg1363 +scratch/main> view reg1363 ``` ```unison @@ -242,13 +242,13 @@ test2 = [: :] ``` ```ucm:hide -.> add +scratch/main> add ``` View is fine. ```ucm -.> view test2 +scratch/main> view test2 ``` But note it's not obvious how display should best be handling this. At the moment it just does the simplest thing: ```ucm -.> display test2 +scratch/main> display test2 ``` diff --git a/unison-src/transcripts/doc-formatting.output.md b/unison-src/transcripts/doc-formatting.output.md index d4c000906..b472f9177 100644 --- a/unison-src/transcripts/doc-formatting.output.md +++ b/unison-src/transcripts/doc-formatting.output.md @@ -23,7 +23,7 @@ foo n = ``` ```ucm -.> view foo +scratch/main> view foo foo : Nat -> Nat foo n = @@ -52,7 +52,7 @@ escaping = [: Docs look [: like \@this \:] :] ``` ```ucm -.> view escaping +scratch/main> view escaping escaping : Doc escaping = [: Docs look [: like \@this \:] :] @@ -84,7 +84,7 @@ commented = [: ``` ```ucm -.> view commented +scratch/main> view commented commented : Doc commented = @@ -119,7 +119,7 @@ doc1 = [: hi :] ``` ```ucm -.> view doc1 +scratch/main> view doc1 doc1 : Doc doc1 = [: hi :] @@ -151,7 +151,7 @@ doc2 = [: hello ``` ```ucm -.> view doc2 +scratch/main> view doc2 doc2 : Doc doc2 = @@ -190,7 +190,7 @@ Note that because of the special treatment of the first line mentioned above, wh ``` ```ucm -.> view doc3 +scratch/main> view doc3 doc3 : Doc doc3 = @@ -237,7 +237,7 @@ doc4 = [: Here's another example of some paragraphs. ``` ```ucm -.> view doc4 +scratch/main> view doc4 doc4 : Doc doc4 = @@ -272,7 +272,7 @@ doc5 = [: - foo ``` ```ucm -.> view doc5 +scratch/main> view doc5 doc5 : Doc doc5 = @@ -304,7 +304,7 @@ doc6 = [: ``` ```ucm -.> view doc6 +scratch/main> view doc6 doc6 : Doc doc6 = @@ -338,7 +338,7 @@ expr = foo 1 ``` ```ucm -.> view empty +scratch/main> view empty empty : Doc empty = [: :] @@ -398,7 +398,7 @@ para line lorem ipsum dolor lorem ipsum dolor lorem ipsum dolor lorem ipsum dolo ``` ```ucm -.> view test1 +scratch/main> view test1 test1 : Doc test1 = @@ -480,7 +480,7 @@ reg1363 = [: `@List.take foo` bar ``` ```ucm -.> view reg1363 +scratch/main> view reg1363 reg1363 : Doc reg1363 = [: `@List.take foo` bar baz :] @@ -511,7 +511,7 @@ test2 = [: ``` View is fine. ```ucm -.> view test2 +scratch/main> view test2 test2 : Doc test2 = @@ -522,7 +522,7 @@ View is fine. ``` But note it's not obvious how display should best be handling this. At the moment it just does the simplest thing: ```ucm -.> display test2 +scratch/main> display test2 Take a look at this: foo : Nat -> Nat diff --git a/unison-src/transcripts/doc-type-link-keywords.md b/unison-src/transcripts/doc-type-link-keywords.md index a4cb0007a..736e256de 100644 --- a/unison-src/transcripts/doc-type-link-keywords.md +++ b/unison-src/transcripts/doc-type-link-keywords.md @@ -7,7 +7,7 @@ not the ability `Patterns`; the lexer should see this as a single identifier. See https://github.com/unisonweb/unison/issues/2642 for an example. ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -28,14 +28,14 @@ docs.example4 = {{A doc that links to the {type Labels} type}} ``` ```ucm:hide -.> add +scratch/main> add ``` Now we check that each doc links to the object of the correct name: ```ucm -.> display docs.example1 -.> display docs.example2 -.> display docs.example3 -.> display docs.example4 +scratch/main> display docs.example1 +scratch/main> display docs.example2 +scratch/main> display docs.example3 +scratch/main> display docs.example4 ``` diff --git a/unison-src/transcripts/doc-type-link-keywords.output.md b/unison-src/transcripts/doc-type-link-keywords.output.md index 9eea235a1..ed7b0b7b7 100644 --- a/unison-src/transcripts/doc-type-link-keywords.output.md +++ b/unison-src/transcripts/doc-type-link-keywords.output.md @@ -26,19 +26,19 @@ docs.example4 = {{A doc that links to the {type Labels} type}} Now we check that each doc links to the object of the correct name: ```ucm -.> display docs.example1 +scratch/main> display docs.example1 A doc that links to the abilityPatterns term -.> display docs.example2 +scratch/main> display docs.example2 A doc that links to the Patterns ability -.> display docs.example3 +scratch/main> display docs.example3 A doc that links to the typeLabels term -.> display docs.example4 +scratch/main> display docs.example4 A doc that links to the Labels type diff --git a/unison-src/transcripts/doc1.md b/unison-src/transcripts/doc1.md index 7379c4719..6f8459395 100644 --- a/unison-src/transcripts/doc1.md +++ b/unison-src/transcripts/doc1.md @@ -1,13 +1,13 @@ # Documenting Unison code ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge lib.builtins ``` Unison documentation is written in Unison. Documentation is a value of the following type: ```ucm -.builtin> view Doc +scratch/main> view lib.builtins.Doc ``` You can create these `Doc` values with ordinary code, or you can use the special syntax. A value of structural type `Doc` can be created via syntax like: @@ -42,7 +42,7 @@ List.take.ex2 = take 2 [1,2,3,4,5] ``` ```ucm -.builtin> add +scratch/main> add ``` And now let's write our docs and reference these examples: @@ -67,17 +67,17 @@ List.take.doc = [: Let's add it to the codebase. ```ucm -.builtin> add +scratch/main> add ``` We can view it with `docs`, which shows the `Doc` value that is associated with a definition. ```ucm -.builtin> docs List.take +scratch/main> docs List.take ``` Note that if we view the source of the documentation, the various references are *not* expanded. ```ucm -.builtin> view List.take +scratch/main> view List.take ``` diff --git a/unison-src/transcripts/doc1.output.md b/unison-src/transcripts/doc1.output.md index 9fc30e160..563932e2b 100644 --- a/unison-src/transcripts/doc1.output.md +++ b/unison-src/transcripts/doc1.output.md @@ -3,15 +3,15 @@ Unison documentation is written in Unison. Documentation is a value of the following type: ```ucm -.builtin> view Doc +scratch/main> view lib.builtins.Doc - type Doc + type lib.builtins.Doc = Blob Text | Link Link | Source Link | Signature Term | Evaluate Term - | Join [Doc] + | Join [lib.builtins.Doc] ``` You can create these `Doc` values with ordinary code, or you can use the special syntax. A value of structural type `Doc` can be created via syntax like: @@ -73,7 +73,7 @@ List.take.ex2 = take 2 [1,2,3,4,5] ``` ```ucm -.builtin> add +scratch/main> add ⍟ I've added these definitions: @@ -116,7 +116,7 @@ List.take.doc = [: Let's add it to the codebase. ```ucm -.builtin> add +scratch/main> add ⍟ I've added these definitions: @@ -126,7 +126,7 @@ Let's add it to the codebase. We can view it with `docs`, which shows the `Doc` value that is associated with a definition. ```ucm -.builtin> docs List.take +scratch/main> docs List.take `List.take n xs` returns the first `n` elements of `xs`. (No need to add line breaks manually. The display command will do @@ -151,8 +151,9 @@ We can view it with `docs`, which shows the `Doc` value that is associated with Note that if we view the source of the documentation, the various references are *not* expanded. ```ucm -.builtin> view List.take +scratch/main> view List.take - builtin List.take : Nat -> [a] -> [a] + builtin lib.builtins.List.take : + lib.builtins.Nat -> [a] -> [a] ``` diff --git a/unison-src/transcripts/doc2.md b/unison-src/transcripts/doc2.md index 278cc8f49..32cb27429 100644 --- a/unison-src/transcripts/doc2.md +++ b/unison-src/transcripts/doc2.md @@ -1,7 +1,7 @@ # Test parsing and round-trip of doc2 syntax elements ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -114,5 +114,5 @@ Inline '' text literal with 1 space of padding '' in the middle of a sentence. Format it to check that everything pretty-prints in a valid way. ```ucm -.> debug.format +scratch/main> debug.format ``` diff --git a/unison-src/transcripts/doc2.output.md b/unison-src/transcripts/doc2.output.md index e303b639a..7cb162400 100644 --- a/unison-src/transcripts/doc2.output.md +++ b/unison-src/transcripts/doc2.output.md @@ -110,7 +110,7 @@ Inline '' text literal with 1 space of padding '' in the middle of a sentence. Format it to check that everything pretty-prints in a valid way. ```ucm -.> debug.format +scratch/main> debug.format ``` ```unison:added-by-ucm scratch.u diff --git a/unison-src/transcripts/doc2markdown.md b/unison-src/transcripts/doc2markdown.md index a7ac7a808..89b068a29 100644 --- a/unison-src/transcripts/doc2markdown.md +++ b/unison-src/transcripts/doc2markdown.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -86,11 +86,11 @@ Table ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> debug.doc-to-markdown fulldoc +scratch/main> debug.doc-to-markdown fulldoc ``` You can add docs to a term or type with a top-level doc literal above the binding: diff --git a/unison-src/transcripts/doc2markdown.output.md b/unison-src/transcripts/doc2markdown.output.md index c9b98f984..5475c1cbf 100644 --- a/unison-src/transcripts/doc2markdown.output.md +++ b/unison-src/transcripts/doc2markdown.output.md @@ -82,7 +82,7 @@ Table ``` ```ucm -.> debug.doc-to-markdown fulldoc +scratch/main> debug.doc-to-markdown fulldoc Heres some text with a soft line break diff --git a/unison-src/transcripts/duplicate-names.md b/unison-src/transcripts/duplicate-names.md index 2935a401b..d40cc9e82 100644 --- a/unison-src/transcripts/duplicate-names.md +++ b/unison-src/transcripts/duplicate-names.md @@ -1,7 +1,7 @@ # Duplicate names in scratch file. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Term and ability constructor collisions should cause a parse error. @@ -49,6 +49,6 @@ X = () ``` ```ucm -.> add -.> view X +scratch/main> add +scratch/main> view X ``` diff --git a/unison-src/transcripts/duplicate-names.output.md b/unison-src/transcripts/duplicate-names.output.md index 7e82b2e04..9a15abbb7 100644 --- a/unison-src/transcripts/duplicate-names.output.md +++ b/unison-src/transcripts/duplicate-names.output.md @@ -125,7 +125,7 @@ X = () ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -133,7 +133,7 @@ X = () (also named builtin.Unit) X : () -.> view X +scratch/main> view X structural type X = Z diff --git a/unison-src/transcripts/duplicate-term-detection.md b/unison-src/transcripts/duplicate-term-detection.md index 61b2a8ebf..3df20584b 100644 --- a/unison-src/transcripts/duplicate-term-detection.md +++ b/unison-src/transcripts/duplicate-term-detection.md @@ -1,7 +1,7 @@ # Duplicate Term Detection ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` diff --git a/unison-src/transcripts/ed25519.md b/unison-src/transcripts/ed25519.md index 679a8900a..b7f7860c9 100644 --- a/unison-src/transcripts/ed25519.md +++ b/unison-src/transcripts/ed25519.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/edit-command.md b/unison-src/transcripts/edit-command.md index 4c4edc9e4..106b28fea 100644 --- a/unison-src/transcripts/edit-command.md +++ b/unison-src/transcripts/edit-command.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison /private/tmp/scratch.u @@ -11,11 +11,11 @@ mytest = [Ok "ok"] ``` ```ucm -.> add -.> edit foo bar -.> edit mytest +scratch/main> add +scratch/main> edit foo bar +scratch/main> edit mytest ``` ```ucm:error -.> edit missing +scratch/main> edit missing ``` diff --git a/unison-src/transcripts/edit-command.output.md b/unison-src/transcripts/edit-command.output.md index a4c428e28..644db7ce7 100644 --- a/unison-src/transcripts/edit-command.output.md +++ b/unison-src/transcripts/edit-command.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -33,7 +33,7 @@ mytest = [Ok "ok"] ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -41,7 +41,7 @@ mytest = [Ok "ok"] foo : Nat mytest : [Result] -.> edit foo bar +scratch/main> edit foo bar ☝️ @@ -50,7 +50,7 @@ mytest = [Ok "ok"] You can edit them there, then run `update` to replace the definitions currently in this namespace. -.> edit mytest +scratch/main> edit mytest ☝️ @@ -73,7 +73,7 @@ test> mytest = [Ok "ok"] ``` ```ucm -.> edit missing +scratch/main> edit missing ⚠️ diff --git a/unison-src/transcripts/empty-namespaces.md b/unison-src/transcripts/empty-namespaces.md index d9497fc93..ff9cb042d 100644 --- a/unison-src/transcripts/empty-namespaces.md +++ b/unison-src/transcripts/empty-namespaces.md @@ -5,19 +5,19 @@ mynamespace.x = 1 ``` ```ucm:hide -.> add -.> delete.namespace mynamespace +scratch/main> add +scratch/main> delete.namespace mynamespace ``` The deleted namespace shouldn't appear in `ls` output. ```ucm:error -.> ls +scratch/main> ls ``` ```ucm:error -.> find.verbose +scratch/main> find.verbose ``` ```ucm:error -.> find mynamespace +scratch/main> find mynamespace ``` ## history @@ -25,7 +25,7 @@ The deleted namespace shouldn't appear in `ls` output. The history of the namespace should be empty. ```ucm -.> history mynamespace +scratch/main> history mynamespace ``` Add and then delete a term to add some history to a deleted namespace. @@ -36,8 +36,8 @@ stuff.thing = 2 ``` ```ucm:hide -.> add -.> delete.namespace deleted +scratch/main> add +scratch/main> delete.namespace deleted ``` ## fork @@ -45,14 +45,14 @@ stuff.thing = 2 I should be allowed to fork over a deleted namespace ```ucm -.> fork stuff deleted +scratch/main> fork stuff deleted ``` The history from the `deleted` namespace should have been overwritten by the history from `stuff`. ```ucm -.> history stuff -.> history deleted +scratch/main> history stuff +scratch/main> history deleted ``` ## move.namespace @@ -63,15 +63,15 @@ moveme.y = 2 ``` ```ucm:hide -.> add +scratch/main> add ``` I should be able to move a namespace over-top of a deleted namespace. The history should be that of the moved namespace. ```ucm -.> delete.namespace moveoverme -.> history moveme -.> move.namespace moveme moveoverme -.> history moveoverme +scratch/main> delete.namespace moveoverme +scratch/main> history moveme +scratch/main> move.namespace moveme moveoverme +scratch/main> history moveoverme ``` diff --git a/unison-src/transcripts/empty-namespaces.output.md b/unison-src/transcripts/empty-namespaces.output.md index 7fb5de89e..8eee1f1a1 100644 --- a/unison-src/transcripts/empty-namespaces.output.md +++ b/unison-src/transcripts/empty-namespaces.output.md @@ -6,13 +6,13 @@ mynamespace.x = 1 The deleted namespace shouldn't appear in `ls` output. ```ucm -.> ls +scratch/main> ls nothing to show ``` ```ucm -.> find.verbose +scratch/main> find.verbose ☝️ @@ -29,7 +29,7 @@ The deleted namespace shouldn't appear in `ls` output. ``` ```ucm -.> find mynamespace +scratch/main> find mynamespace ☝️ @@ -50,9 +50,9 @@ The deleted namespace shouldn't appear in `ls` output. The history of the namespace should be empty. ```ucm -.> history mynamespace +scratch/main> history mynamespace - ☝️ The namespace .mynamespace is empty. + ☝️ The namespace mynamespace is empty. ``` Add and then delete a term to add some history to a deleted namespace. @@ -67,7 +67,7 @@ stuff.thing = 2 I should be allowed to fork over a deleted namespace ```ucm -.> fork stuff deleted +scratch/main> fork stuff deleted Done. @@ -75,7 +75,7 @@ I should be allowed to fork over a deleted namespace The history from the `deleted` namespace should have been overwritten by the history from `stuff`. ```ucm -.> history stuff +scratch/main> history stuff Note: The most recent namespace hash is immediately below this message. @@ -84,7 +84,7 @@ The history from the `deleted` namespace should have been overwritten by the his □ 1. #q2dq4tsno1 (start of history) -.> history deleted +scratch/main> history deleted Note: The most recent namespace hash is immediately below this message. @@ -105,11 +105,11 @@ I should be able to move a namespace over-top of a deleted namespace. The history should be that of the moved namespace. ```ucm -.> delete.namespace moveoverme +scratch/main> delete.namespace moveoverme Done. -.> history moveme +scratch/main> history moveme Note: The most recent namespace hash is immediately below this message. @@ -118,11 +118,11 @@ The history should be that of the moved namespace. □ 1. #c5uisu4kll (start of history) -.> move.namespace moveme moveoverme +scratch/main> move.namespace moveme moveoverme Done. -.> history moveoverme +scratch/main> history moveoverme Note: The most recent namespace hash is immediately below this message. diff --git a/unison-src/transcripts/emptyCodebase.md b/unison-src/transcripts/emptyCodebase.md index a9ea55b85..03b4e44e9 100644 --- a/unison-src/transcripts/emptyCodebase.md +++ b/unison-src/transcripts/emptyCodebase.md @@ -7,21 +7,21 @@ Not even `Nat` or `+`! BEHOLD!!! ```ucm:error -.> ls +scratch/main> ls ``` Technically, the definitions all exist, but they have no names. `builtins.merge` brings them into existence, under the current namespace: ```ucm -.foo> builtins.merge -.foo> ls +scratch/main> builtins.merge lib.builtins +scratch/main> ls lib ``` And for a limited time, you can get even more builtin goodies: ```ucm -.foo> builtins.mergeio -.foo> ls +scratch/main> builtins.mergeio lib.builtinsio +scratch/main> ls lib ``` More typically, you'd start out by pulling `base`. diff --git a/unison-src/transcripts/emptyCodebase.output.md b/unison-src/transcripts/emptyCodebase.output.md index 672ac4857..bbb762a28 100644 --- a/unison-src/transcripts/emptyCodebase.output.md +++ b/unison-src/transcripts/emptyCodebase.output.md @@ -7,7 +7,7 @@ Not even `Nat` or `+`! BEHOLD!!! ```ucm -.> ls +scratch/main> ls nothing to show @@ -15,27 +15,26 @@ BEHOLD!!! Technically, the definitions all exist, but they have no names. `builtins.merge` brings them into existence, under the current namespace: ```ucm - ☝️ The namespace .foo is empty. - -.foo> builtins.merge +scratch/main> builtins.merge lib.builtins Done. -.foo> ls +scratch/main> ls lib - 1. builtin/ (469 terms, 74 types) + 1. builtins/ (469 terms, 74 types) ``` And for a limited time, you can get even more builtin goodies: ```ucm -.foo> builtins.mergeio +scratch/main> builtins.mergeio lib.builtinsio Done. -.foo> ls +scratch/main> ls lib - 1. builtin/ (643 terms, 92 types) + 1. builtins/ (469 terms, 74 types) + 2. builtinsio/ (643 terms, 92 types) ``` More typically, you'd start out by pulling `base. diff --git a/unison-src/transcripts/error-messages.md b/unison-src/transcripts/error-messages.md index de58eb43b..8490e491a 100644 --- a/unison-src/transcripts/error-messages.md +++ b/unison-src/transcripts/error-messages.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This file contains programs with parse errors and type errors, for visual inspection of error message quality and to check for regressions or changes to error reporting. diff --git a/unison-src/transcripts/errors/missing-result-typed.md b/unison-src/transcripts/errors/missing-result-typed.md index 47a3eb792..c61c2ccef 100644 --- a/unison-src/transcripts/errors/missing-result-typed.md +++ b/unison-src/transcripts/errors/missing-result-typed.md @@ -6,7 +6,7 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide:all diff --git a/unison-src/transcripts/errors/ucm-hide-all-error.md b/unison-src/transcripts/errors/ucm-hide-all-error.md index dcf94d8d3..5952056f4 100644 --- a/unison-src/transcripts/errors/ucm-hide-all-error.md +++ b/unison-src/transcripts/errors/ucm-hide-all-error.md @@ -8,5 +8,5 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm:hide:all:error -.> history +scratch/main> history ``` diff --git a/unison-src/transcripts/errors/ucm-hide-all-error.output.md b/unison-src/transcripts/errors/ucm-hide-all-error.output.md index e3a9558ab..9b8c0b43e 100644 --- a/unison-src/transcripts/errors/ucm-hide-all-error.output.md +++ b/unison-src/transcripts/errors/ucm-hide-all-error.output.md @@ -8,7 +8,7 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm -.> history +scratch/main> history ``` diff --git a/unison-src/transcripts/errors/ucm-hide-all.md b/unison-src/transcripts/errors/ucm-hide-all.md index 22950a933..dd4b963df 100644 --- a/unison-src/transcripts/errors/ucm-hide-all.md +++ b/unison-src/transcripts/errors/ucm-hide-all.md @@ -8,5 +8,5 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm:hide:all -.> move.namespace foo bar +scratch/main> move.namespace foo bar ``` diff --git a/unison-src/transcripts/errors/ucm-hide-all.output.md b/unison-src/transcripts/errors/ucm-hide-all.output.md index 38ec6f09f..56cf454d4 100644 --- a/unison-src/transcripts/errors/ucm-hide-all.output.md +++ b/unison-src/transcripts/errors/ucm-hide-all.output.md @@ -8,7 +8,7 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm -.> move.namespace foo bar +scratch/main> move.namespace foo bar ``` diff --git a/unison-src/transcripts/errors/ucm-hide-error.md b/unison-src/transcripts/errors/ucm-hide-error.md index 68da57efc..9b338dfd9 100644 --- a/unison-src/transcripts/errors/ucm-hide-error.md +++ b/unison-src/transcripts/errors/ucm-hide-error.md @@ -8,5 +8,5 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm:hide:error -.> history +scratch/main> history ``` diff --git a/unison-src/transcripts/errors/ucm-hide-error.output.md b/unison-src/transcripts/errors/ucm-hide-error.output.md index 0056a3588..3e80bd4a7 100644 --- a/unison-src/transcripts/errors/ucm-hide-error.output.md +++ b/unison-src/transcripts/errors/ucm-hide-error.output.md @@ -8,7 +8,7 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm -.> history +scratch/main> history ``` diff --git a/unison-src/transcripts/errors/ucm-hide.md b/unison-src/transcripts/errors/ucm-hide.md index aa725ada4..470c610b5 100644 --- a/unison-src/transcripts/errors/ucm-hide.md +++ b/unison-src/transcripts/errors/ucm-hide.md @@ -8,5 +8,5 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm:hide -.> move.namespace foo bar +scratch/main> move.namespace foo bar ``` diff --git a/unison-src/transcripts/errors/ucm-hide.output.md b/unison-src/transcripts/errors/ucm-hide.output.md index fe4faa583..2c88db7f5 100644 --- a/unison-src/transcripts/errors/ucm-hide.output.md +++ b/unison-src/transcripts/errors/ucm-hide.output.md @@ -8,7 +8,7 @@ then the transcript parser should print the stanza and surface a helpful message. ```ucm -.> move.namespace foo bar +scratch/main> move.namespace foo bar ``` diff --git a/unison-src/transcripts/find-by-type.md b/unison-src/transcripts/find-by-type.md index 009ad845e..ec6dd3f95 100644 --- a/unison-src/transcripts/find-by-type.md +++ b/unison-src/transcripts/find-by-type.md @@ -1,5 +1,5 @@ ```ucm:hide -.> alias.type ##Text builtin.Text +scratch/main> alias.type ##Text builtin.Text ``` ```unison:hide @@ -17,11 +17,11 @@ baz = cases ``` ```ucm -.> add -.> find : Text -> A -.> find : A -> Text -.> find : A +scratch/main> add +scratch/main> find : Text -> A +scratch/main> find : A -> Text +scratch/main> find : A ``` ```ucm:error -.> find : Text +scratch/main> find : Text ``` diff --git a/unison-src/transcripts/find-by-type.output.md b/unison-src/transcripts/find-by-type.output.md index 0577051f9..4fcbf2d85 100644 --- a/unison-src/transcripts/find-by-type.output.md +++ b/unison-src/transcripts/find-by-type.output.md @@ -13,7 +13,7 @@ baz = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -22,25 +22,25 @@ baz = cases baz : A -> Text foo : A -.> find : Text -> A +scratch/main> find : Text -> A 1. bar : Text -> A 2. A.A : Text -> A -.> find : A -> Text +scratch/main> find : A -> Text 1. baz : A -> Text -.> find : A +scratch/main> find : A 1. foo : A ``` ```ucm -.> find : Text +scratch/main> find : Text ☝️ diff --git a/unison-src/transcripts/find-command.md b/unison-src/transcripts/find-command.md index 46f852dd3..019903556 100644 --- a/unison-src/transcripts/find-command.md +++ b/unison-src/transcripts/find-command.md @@ -1,6 +1,5 @@ ```ucm:hide -.> builtins.merge -.> move builtin lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison:hide @@ -14,37 +13,36 @@ somewhere.bar = 7 ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> find foo -.> view 1 -.> find.all foo -.> view 1 +scratch/main> find foo +scratch/main> view 1 +scratch/main> find.all foo +scratch/main> view 1 ``` ```ucm -.> find-in cat foo -.> view 1 -.> find-in.all cat foo -.> view 1 +scratch/main> find-in cat foo +scratch/main> view 1 +scratch/main> find-in.all cat foo +scratch/main> view 1 ``` -```ucm -.somewhere> find bar -.somewhere> find.global bar -``` +Finding within a namespace ```ucm -.> find bar -.> find-in somewhere bar +scratch/main> find bar +-- Shows UUIDs +-- scratch/main> find.global bar +scratch/main> find-in somewhere bar ``` ```ucm:error -.> find baz +scratch/main> find baz ``` ```ucm:error -.> find.global notHere +scratch/main> find.global notHere ``` diff --git a/unison-src/transcripts/find-command.output.md b/unison-src/transcripts/find-command.output.md index f3a11b891..f75da189b 100644 --- a/unison-src/transcripts/find-command.output.md +++ b/unison-src/transcripts/find-command.output.md @@ -9,18 +9,18 @@ somewhere.bar = 7 ``` ```ucm -.> find foo +scratch/main> find foo 1. cat.foo : Nat 2. foo : Nat -.> view 1 +scratch/main> view 1 cat.foo : Nat cat.foo = 4 -.> find.all foo +scratch/main> find.all foo 1. cat.foo : Nat 2. cat.lib.foo : Nat @@ -28,63 +28,53 @@ somewhere.bar = 7 4. foo : Nat -.> view 1 +scratch/main> view 1 cat.foo : Nat cat.foo = 4 ``` ```ucm -.> find-in cat foo +scratch/main> find-in cat foo 1. foo : Nat -.> view 1 +scratch/main> view 1 cat.foo : Nat cat.foo = 4 -.> find-in.all cat foo +scratch/main> find-in.all cat foo 1. lib.foo : Nat 2. foo : Nat -.> view 1 +scratch/main> view 1 cat.lib.foo : Nat cat.lib.foo = 5 ``` +Finding within a namespace + ```ucm -.somewhere> find bar - - 1. bar : ##Nat - - -.somewhere> find.global bar - - 1. .cat.lib.bar : Nat - 2. .lib.bar : Nat - 3. .somewhere.bar : Nat - - -``` -```ucm -.> find bar +scratch/main> find bar 1. somewhere.bar : Nat -.> find-in somewhere bar +-- Shows UUIDs +-- scratch/main> find.global bar +scratch/main> find-in somewhere bar 1. bar : Nat ``` ```ucm -.> find baz +scratch/main> find baz ☝️ @@ -101,7 +91,7 @@ somewhere.bar = 7 ``` ```ucm -.> find.global notHere +scratch/main> find.global notHere 😶 diff --git a/unison-src/transcripts/fix-1381-excess-propagate.md b/unison-src/transcripts/fix-1381-excess-propagate.md index 84da98c5b..e7314c9bd 100644 --- a/unison-src/transcripts/fix-1381-excess-propagate.md +++ b/unison-src/transcripts/fix-1381-excess-propagate.md @@ -7,7 +7,7 @@ X.foo = "a namespace" ``` ```ucm -.> add +scratch/main> add ``` Here is an update which should not affect `X`: @@ -15,14 +15,14 @@ Here is an update which should not affect `X`: a = "an update" ``` ```ucm -.> update +scratch/main> update ``` As of the time of this writing, the history for `X` should be a single node, `#4eeuo5bsfr`; ```ucm -.> history X +scratch/main> history X ``` however, as of release/M1i, we saw an extraneous node appear. If your `ucm` is fixed, you won't see it below: ```ucm:error -.> history #7nl6ppokhg +scratch/main> history #7nl6ppokhg ``` diff --git a/unison-src/transcripts/fix-1381-excess-propagate.output.md b/unison-src/transcripts/fix-1381-excess-propagate.output.md index f07217266..d35a89262 100644 --- a/unison-src/transcripts/fix-1381-excess-propagate.output.md +++ b/unison-src/transcripts/fix-1381-excess-propagate.output.md @@ -7,7 +7,7 @@ X.foo = "a namespace" ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -21,7 +21,7 @@ a = "an update" ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -31,7 +31,7 @@ a = "an update" ``` As of the time of this writing, the history for `X` should be a single node, `#4eeuo5bsfr`; ```ucm -.> history X +scratch/main> history X Note: The most recent namespace hash is immediately below this message. @@ -43,7 +43,7 @@ As of the time of this writing, the history for `X` should be a single node, `#4 ``` however, as of release/M1i, we saw an extraneous node appear. If your `ucm` is fixed, you won't see it below: ```ucm -.> history #7nl6ppokhg +scratch/main> history #7nl6ppokhg 😶 diff --git a/unison-src/transcripts/fix-2258-if-as-list-element.md b/unison-src/transcripts/fix-2258-if-as-list-element.md index fbf9cc93d..1ebc3a225 100644 --- a/unison-src/transcripts/fix-2258-if-as-list-element.md +++ b/unison-src/transcripts/fix-2258-if-as-list-element.md @@ -1,7 +1,7 @@ Tests that `if` statements can appear as list and tuple elements. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide diff --git a/unison-src/transcripts/fix-big-list-crash.md b/unison-src/transcripts/fix-big-list-crash.md index 22be8f0cb..70c056515 100644 --- a/unison-src/transcripts/fix-big-list-crash.md +++ b/unison-src/transcripts/fix-big-list-crash.md @@ -1,7 +1,7 @@ #### Big list crash ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Big lists have been observed to crash, while in the garbage collection step. diff --git a/unison-src/transcripts/fix1063.md b/unison-src/transcripts/fix1063.md index a7160f356..03ea62be7 100644 --- a/unison-src/transcripts/fix1063.md +++ b/unison-src/transcripts/fix1063.md @@ -1,7 +1,7 @@ Tests that functions named `.` are rendered correctly. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ``` unison @@ -13,7 +13,7 @@ noop = not `.` not ``` ``` ucm -.> add -.> view noop +scratch/main> add +scratch/main> view noop ``` diff --git a/unison-src/transcripts/fix1063.output.md b/unison-src/transcripts/fix1063.output.md index 80a1cc8a2..d9d2e8380 100644 --- a/unison-src/transcripts/fix1063.output.md +++ b/unison-src/transcripts/fix1063.output.md @@ -23,14 +23,14 @@ noop = not `.` not ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: `.` : (i1 ->{g1} o) -> (i ->{g} i1) -> i ->{g1, g} o noop : Boolean -> Boolean -.> view noop +scratch/main> view noop noop : Boolean -> Boolean noop = diff --git a/unison-src/transcripts/fix1334.md b/unison-src/transcripts/fix1334.md index 68e696748..5ab5899ae 100644 --- a/unison-src/transcripts/fix1334.md +++ b/unison-src/transcripts/fix1334.md @@ -5,6 +5,6 @@ With this PR, the source of an alias can be a short hash (even of a definition t Let's make some hash-only aliases, now that we can. :mad-with-power-emoji: ```ucm -.> alias.type ##Nat Cat -.> alias.term ##Nat.+ please_fix_763.+ +scratch/main> alias.type ##Nat Cat +scratch/main> alias.term ##Nat.+ please_fix_763.+ ``` diff --git a/unison-src/transcripts/fix1334.output.md b/unison-src/transcripts/fix1334.output.md index d397a51a1..4e08c294b 100644 --- a/unison-src/transcripts/fix1334.output.md +++ b/unison-src/transcripts/fix1334.output.md @@ -5,11 +5,11 @@ With this PR, the source of an alias can be a short hash (even of a definition t Let's make some hash-only aliases, now that we can. :mad-with-power-emoji: ```ucm -.> alias.type ##Nat Cat +scratch/main> alias.type ##Nat Cat Done. -.> alias.term ##Nat.+ please_fix_763.+ +scratch/main> alias.term ##Nat.+ please_fix_763.+ Done. diff --git a/unison-src/transcripts/fix1390.md b/unison-src/transcripts/fix1390.md index 807cb14d2..2ef5e8ac9 100644 --- a/unison-src/transcripts/fix1390.md +++ b/unison-src/transcripts/fix1390.md @@ -1,6 +1,6 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -13,8 +13,8 @@ List.map f = ``` ```ucm -.> add -.> view List.map +scratch/main> add +scratch/main> view List.map ``` ```unison diff --git a/unison-src/transcripts/fix1390.output.md b/unison-src/transcripts/fix1390.output.md index 67155bde5..164f3a8a6 100644 --- a/unison-src/transcripts/fix1390.output.md +++ b/unison-src/transcripts/fix1390.output.md @@ -1,6 +1,6 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -28,13 +28,13 @@ List.map f = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: List.map : (i ->{g} o) -> [i] ->{g} [o] -.> view List.map +scratch/main> view List.map List.map : (i ->{g} o) -> [i] ->{g} [o] List.map f = diff --git a/unison-src/transcripts/fix1532.md b/unison-src/transcripts/fix1532.md index 6b5a07c93..fc835cc46 100644 --- a/unison-src/transcripts/fix1532.md +++ b/unison-src/transcripts/fix1532.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` First, lets create two namespaces. `foo` and `bar`, and add some definitions. @@ -11,30 +11,30 @@ bar.z = x + y ``` ```ucm -.> add +scratch/main> add ``` Let's see what we have created... ```ucm -.> ls +scratch/main> ls ``` Now, if we try deleting the namespace `foo`, we get an error, as expected. ```ucm:error -.> delete.namespace foo +scratch/main> delete.namespace foo ``` Any numbered arguments should refer to `bar.z`. ```ucm -.> debug.numberedArgs +scratch/main> debug.numberedArgs ``` We can then delete the dependent term, and then delete `foo`. ```ucm -.> delete.term 1 -.> delete.namespace foo +scratch/main> delete.term 1 +scratch/main> delete.namespace foo ``` diff --git a/unison-src/transcripts/fix1532.output.md b/unison-src/transcripts/fix1532.output.md index d2707bb51..6b856b35e 100644 --- a/unison-src/transcripts/fix1532.output.md +++ b/unison-src/transcripts/fix1532.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -28,7 +28,7 @@ bar.z = x + y ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -40,7 +40,7 @@ bar.z = x + y Let's see what we have created... ```ucm -.> ls +scratch/main> ls 1. bar/ (1 term) 2. builtin/ (469 terms, 74 types) @@ -50,7 +50,7 @@ Let's see what we have created... Now, if we try deleting the namespace `foo`, we get an error, as expected. ```ucm -.> delete.namespace foo +scratch/main> delete.namespace foo ⚠️ @@ -69,7 +69,7 @@ Now, if we try deleting the namespace `foo`, we get an error, as expected. Any numbered arguments should refer to `bar.z`. ```ucm -.> debug.numberedArgs +scratch/main> debug.numberedArgs 1. bar.z 2. bar.z @@ -78,11 +78,11 @@ Any numbered arguments should refer to `bar.z`. We can then delete the dependent term, and then delete `foo`. ```ucm -.> delete.term 1 +scratch/main> delete.term 1 Done. -.> delete.namespace foo +scratch/main> delete.namespace foo Done. diff --git a/unison-src/transcripts/fix1578.md b/unison-src/transcripts/fix1578.md index 8e2e7958f..809af6c16 100644 --- a/unison-src/transcripts/fix1578.md +++ b/unison-src/transcripts/fix1578.md @@ -3,7 +3,7 @@ This transcript shows how suffix-based name resolution works when definitions in ## Setup ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` As setup, we'll add a data type `Day` and a definition `foo.bar : Nat`. @@ -16,7 +16,7 @@ foo.bar = 23 ``` ```ucm:hide -.> add +scratch/main> add ``` Suffix-based name resolution prefers to use names locally defined in the current file, then checks for matches in the codebase. Here are the precise rules, which will be explained below with examples: diff --git a/unison-src/transcripts/fix1696.md b/unison-src/transcripts/fix1696.md index c80b41a73..4abb83f18 100644 --- a/unison-src/transcripts/fix1696.md +++ b/unison-src/transcripts/fix1696.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:error diff --git a/unison-src/transcripts-using-base/fix1709.md b/unison-src/transcripts/fix1709.md similarity index 83% rename from unison-src/transcripts-using-base/fix1709.md rename to unison-src/transcripts/fix1709.md index bc254f3b2..9b0e868d0 100644 --- a/unison-src/transcripts-using-base/fix1709.md +++ b/unison-src/transcripts/fix1709.md @@ -7,7 +7,7 @@ id2 x = ``` ```ucm -.scratch> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts-using-base/fix1709.output.md b/unison-src/transcripts/fix1709.output.md similarity index 84% rename from unison-src/transcripts-using-base/fix1709.output.md rename to unison-src/transcripts/fix1709.output.md index 953121aa2..8523d4e27 100644 --- a/unison-src/transcripts-using-base/fix1709.output.md +++ b/unison-src/transcripts/fix1709.output.md @@ -14,17 +14,14 @@ id2 x = do an `add` or `update`, here's how your codebase would change: - ⊡ Previously added definitions will be ignored: id - ⍟ These new definitions are ok to `add`: + id : x -> x id2 : x -> x ``` ```ucm - ☝️ The namespace .scratch is empty. - -.scratch> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/fix1731.md b/unison-src/transcripts/fix1731.md index 81adcd8de..82efd3cce 100644 --- a/unison-src/transcripts/fix1731.md +++ b/unison-src/transcripts/fix1731.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide @@ -10,7 +10,7 @@ structural ability CLI where ``` ```ucm:hide -.> add +scratch/main> add ``` The `input` here should parse as a wildcard, not as `CLI.input`. diff --git a/unison-src/transcripts/fix1800.md b/unison-src/transcripts/fix1800.md index a35edb8a2..533d95d84 100644 --- a/unison-src/transcripts/fix1800.md +++ b/unison-src/transcripts/fix1800.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide @@ -26,21 +26,21 @@ Testing a few variations here: * Should be able to run annotated and unannotated main functions from the codebase. ```ucm -.> run main1 -.> run main2 -.> run main3 -.> add -.> rename.term main1 code.main1 -.> rename.term main2 code.main2 -.> rename.term main3 code.main3 +scratch/main> run main1 +scratch/main> run main2 +scratch/main> run main3 +scratch/main> add +scratch/main> rename.term main1 code.main1 +scratch/main> rename.term main2 code.main2 +scratch/main> rename.term main3 code.main3 ``` The renaming just ensures that when running `code.main1`, it has to get that main from the codebase rather than the scratch file: ```ucm -.> run code.main1 -.> run code.main2 -.> run code.main3 +scratch/main> run code.main1 +scratch/main> run code.main2 +scratch/main> run code.main3 ``` Now testing a few variations that should NOT typecheck. @@ -56,9 +56,9 @@ main5 _ = () This shouldn't work since `main4` and `main5` don't have the right type. ```ucm:error -.> run main4 +scratch/main> run main4 ``` ```ucm:error -.> run main5 +scratch/main> run main5 ``` diff --git a/unison-src/transcripts/fix1800.output.md b/unison-src/transcripts/fix1800.output.md index 0a534138a..915f50e70 100644 --- a/unison-src/transcripts/fix1800.output.md +++ b/unison-src/transcripts/fix1800.output.md @@ -22,19 +22,19 @@ Testing a few variations here: * Should be able to run annotated and unannotated main functions from the codebase. ```ucm -.> run main1 +scratch/main> run main1 () -.> run main2 +scratch/main> run main2 () -.> run main3 +scratch/main> run main3 () -.> add +scratch/main> add ⍟ I've added these definitions: @@ -43,15 +43,15 @@ Testing a few variations here: main3 : '{IO} () printLine : Text ->{IO} () -.> rename.term main1 code.main1 +scratch/main> rename.term main1 code.main1 Done. -.> rename.term main2 code.main2 +scratch/main> rename.term main2 code.main2 Done. -.> rename.term main3 code.main3 +scratch/main> rename.term main3 code.main3 Done. @@ -59,15 +59,15 @@ Testing a few variations here: The renaming just ensures that when running `code.main1`, it has to get that main from the codebase rather than the scratch file: ```ucm -.> run code.main1 +scratch/main> run code.main1 () -.> run code.main2 +scratch/main> run code.main2 () -.> run code.main3 +scratch/main> run code.main3 () @@ -85,7 +85,7 @@ main5 _ = () This shouldn't work since `main4` and `main5` don't have the right type. ```ucm -.> run main4 +scratch/main> run main4 😶 @@ -99,7 +99,7 @@ This shouldn't work since `main4` and `main5` don't have the right type. ``` ```ucm -.> run main5 +scratch/main> run main5 😶 diff --git a/unison-src/transcripts/fix1926.md b/unison-src/transcripts/fix1926.md index 373cb0e95..0ebe0e3c8 100644 --- a/unison-src/transcripts/fix1926.md +++ b/unison-src/transcripts/fix1926.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix1926.output.md b/unison-src/transcripts/fix1926.output.md index 9eeb00583..a325470e9 100644 --- a/unison-src/transcripts/fix1926.output.md +++ b/unison-src/transcripts/fix1926.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. diff --git a/unison-src/transcripts/fix2026.md b/unison-src/transcripts/fix2026.md index 819a579e2..df2a51f45 100644 --- a/unison-src/transcripts/fix2026.md +++ b/unison-src/transcripts/fix2026.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison @@ -40,5 +40,5 @@ Exception.unsafeRun! e _ = ``` ```ucm -.> run ex +scratch/main> run ex ``` \ No newline at end of file diff --git a/unison-src/transcripts/fix2026.output.md b/unison-src/transcripts/fix2026.output.md index 1391a35c6..e4f9d8d17 100644 --- a/unison-src/transcripts/fix2026.output.md +++ b/unison-src/transcripts/fix2026.output.md @@ -64,7 +64,7 @@ Exception.unsafeRun! e _ = ``` ```ucm -.> run ex +scratch/main> run ex () diff --git a/unison-src/transcripts/fix2027.md b/unison-src/transcripts/fix2027.md index bcc082456..2a386ae31 100644 --- a/unison-src/transcripts/fix2027.md +++ b/unison-src/transcripts/fix2027.md @@ -1,7 +1,7 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -51,5 +51,5 @@ myServer = unsafeRun! '(hello "127.0.0.1" "0") ``` ```ucm:error -.> run myServer +scratch/main> run myServer ``` diff --git a/unison-src/transcripts/fix2027.output.md b/unison-src/transcripts/fix2027.output.md index b69a8b31b..2a7b30dec 100644 --- a/unison-src/transcripts/fix2027.output.md +++ b/unison-src/transcripts/fix2027.output.md @@ -80,7 +80,7 @@ myServer = unsafeRun! '(hello "127.0.0.1" "0") ``` ```ucm -.> run myServer +scratch/main> run myServer 💔💥 diff --git a/unison-src/transcripts/fix2049.md b/unison-src/transcripts/fix2049.md index ab1983e95..c0cfc4fdb 100644 --- a/unison-src/transcripts/fix2049.md +++ b/unison-src/transcripts/fix2049.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -74,6 +74,6 @@ tests _ = ``` ```ucm -.> add -.> io.test tests +scratch/main> add +scratch/main> io.test tests ``` diff --git a/unison-src/transcripts/fix2049.output.md b/unison-src/transcripts/fix2049.output.md index d5b99e63d..3db4fa2f2 100644 --- a/unison-src/transcripts/fix2049.output.md +++ b/unison-src/transcripts/fix2049.output.md @@ -121,14 +121,14 @@ tests _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: catcher : '{IO} () ->{IO} Result tests : ∀ _. _ ->{IO} [Result] -.> io.test tests +scratch/main> io.test tests New test results: diff --git a/unison-src/transcripts/fix2053.md b/unison-src/transcripts/fix2053.md index 120bbed31..71f36094c 100644 --- a/unison-src/transcripts/fix2053.md +++ b/unison-src/transcripts/fix2053.md @@ -1,7 +1,7 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```ucm -.> display List.map +scratch/main> display List.map ``` diff --git a/unison-src/transcripts/fix2053.output.md b/unison-src/transcripts/fix2053.output.md index d1cf4ec78..39766e272 100644 --- a/unison-src/transcripts/fix2053.output.md +++ b/unison-src/transcripts/fix2053.output.md @@ -1,5 +1,5 @@ ```ucm -.> display List.map +scratch/main> display List.map f a -> let diff --git a/unison-src/transcripts/fix2156.md b/unison-src/transcripts/fix2156.md index 2bc440b14..f18d03fd1 100644 --- a/unison-src/transcripts/fix2156.md +++ b/unison-src/transcripts/fix2156.md @@ -3,7 +3,7 @@ Tests for a case where bad eta reduction was causing erroneous watch output/caching. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2167.md b/unison-src/transcripts/fix2167.md index 4e65ddb6f..5d0381f70 100644 --- a/unison-src/transcripts/fix2167.md +++ b/unison-src/transcripts/fix2167.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This is just a simple transcript to regression check an ability diff --git a/unison-src/transcripts/fix2187.md b/unison-src/transcripts/fix2187.md index f519c30de..2d0eb3fe7 100644 --- a/unison-src/transcripts/fix2187.md +++ b/unison-src/transcripts/fix2187.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2231.md b/unison-src/transcripts/fix2231.md index 0b1ed1641..2fe2660b1 100644 --- a/unison-src/transcripts/fix2231.md +++ b/unison-src/transcripts/fix2231.md @@ -7,7 +7,7 @@ the choices may not work equally well with the type checking strategies. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -25,5 +25,5 @@ txt = foldl (Text.++) "" ["a", "b", "c"] ``` ```ucm -.> add +scratch/main> add ``` diff --git a/unison-src/transcripts/fix2231.output.md b/unison-src/transcripts/fix2231.output.md index 2ff24e5bc..b94ff2c9d 100644 --- a/unison-src/transcripts/fix2231.output.md +++ b/unison-src/transcripts/fix2231.output.md @@ -37,7 +37,7 @@ txt = foldl (Text.++) "" ["a", "b", "c"] ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/fix2238.md b/unison-src/transcripts/fix2238.md index 356209639..37a948c0f 100644 --- a/unison-src/transcripts/fix2238.md +++ b/unison-src/transcripts/fix2238.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` This should not typecheck - the inline `@eval` expression uses abilities. @@ -14,5 +14,5 @@ ex = {{ @eval{abort} }} This file should also not typecheck - it has a triple backticks block that uses abilities. ```ucm:error -.> load unison-src/transcripts/fix2238.u +scratch/main> load unison-src/transcripts/fix2238.u ``` diff --git a/unison-src/transcripts/fix2238.output.md b/unison-src/transcripts/fix2238.output.md index 31a4aca9f..b9594f015 100644 --- a/unison-src/transcripts/fix2238.output.md +++ b/unison-src/transcripts/fix2238.output.md @@ -20,7 +20,7 @@ ex = {{ @eval{abort} }} This file should also not typecheck - it has a triple backticks block that uses abilities. ```ucm -.> load unison-src/transcripts/fix2238.u +scratch/main> load unison-src/transcripts/fix2238.u Loading changes detected in unison-src/transcripts/fix2238.u. diff --git a/unison-src/transcripts/fix2244.md b/unison-src/transcripts/fix2244.md index e270dc5f2..e1dba0b05 100644 --- a/unison-src/transcripts/fix2244.md +++ b/unison-src/transcripts/fix2244.md @@ -1,13 +1,13 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` Ensure closing token is emitted by closing brace in doc eval block. ```ucm -.> load ./unison-src/transcripts/fix2244.u +scratch/main> load ./unison-src/transcripts/fix2244.u ``` ```ucm:hide -.> add +scratch/main> add ``` diff --git a/unison-src/transcripts/fix2244.output.md b/unison-src/transcripts/fix2244.output.md index 44b65347d..63ac780c2 100644 --- a/unison-src/transcripts/fix2244.output.md +++ b/unison-src/transcripts/fix2244.output.md @@ -1,7 +1,7 @@ Ensure closing token is emitted by closing brace in doc eval block. ```ucm -.> load ./unison-src/transcripts/fix2244.u +scratch/main> load ./unison-src/transcripts/fix2244.u Loading changes detected in ./unison-src/transcripts/fix2244.u. diff --git a/unison-src/transcripts/fix2254.md b/unison-src/transcripts/fix2254.md index 3b6dd15e6..7af9ffd9f 100644 --- a/unison-src/transcripts/fix2254.md +++ b/unison-src/transcripts/fix2254.md @@ -1,6 +1,6 @@ ```ucm:hide -.a> builtins.merge +scratch/a> builtins.merge lib.builtins ``` This transcript checks that updates to data types propagate successfully to dependent types and dependent terms that do pattern matching. First let's create some types and terms: @@ -35,11 +35,12 @@ g = cases _ -> 43 ``` -We'll make our edits in a fork of the `a` namespace: +We'll make our edits in a new branch. ```ucm -.a> add -.> fork a a2 +scratch/a> add +scratch/a> branch a2 +scratch/a2> ``` First let's edit the `A` type, adding another constructor `E`. Note that the functions written against the old type have a wildcard in their pattern match, so they should work fine after the update. @@ -56,31 +57,29 @@ unique type A a b c d Let's do the update now, and verify that the definitions all look good and there's nothing `todo`: ```ucm -.a2> update.old -.a2> view A NeedsA f f2 f3 g -.a2> todo -``` - -```ucm:hide -.a2> builtins.merge +scratch/a2> update.old +scratch/a2> view A NeedsA f f2 f3 g +scratch/a2> todo ``` ## Record updates Here's a test of updating a record: +```ucm:hide +scratch/r1> builtins.merge lib.builtins +``` + + ```unison structural type Rec = { uno : Nat, dos : Nat } combine r = uno r + dos r ``` -```ucm:hide -.a3> builtins.merge -``` - ```ucm -.a3> add +scratch/r1> add +scratch/r1> branch r2 ``` ```unison @@ -90,7 +89,6 @@ structural type Rec = { uno : Nat, dos : Nat, tres : Text } And checking that after updating this record, there's nothing `todo`: ```ucm -.> fork a3 a4 -.a4> update.old -.a4> todo +scratch/r2> update.old +scratch/r2> todo ``` diff --git a/unison-src/transcripts/fix2254.output.md b/unison-src/transcripts/fix2254.output.md index dbbdf4685..16e4285c1 100644 --- a/unison-src/transcripts/fix2254.output.md +++ b/unison-src/transcripts/fix2254.output.md @@ -31,10 +31,10 @@ g = cases _ -> 43 ``` -We'll make our edits in a fork of the `a` namespace: +We'll make our edits in a new branch. ```ucm -.a> add +scratch/a> add ⍟ I've added these definitions: @@ -45,9 +45,12 @@ We'll make our edits in a fork of the `a` namespace: f3 : NeedsA Nat Nat -> Nat g : A Nat Nat Nat Nat -> Nat -.> fork a a2 +scratch/a> branch a2 - Done. + Done. I've created the a2 branch based off of a. + + Tip: To merge your work back into the a branch, first + `switch /a` then `merge /a2`. ``` First let's edit the `A` type, adding another constructor `E`. Note that the functions written against the old type have a wildcard in their pattern match, so they should work fine after the update. @@ -64,24 +67,24 @@ unique type A a b c d Let's do the update now, and verify that the definitions all look good and there's nothing `todo`: ```ucm -.a2> update.old +scratch/a2> update.old ⍟ I've updated these names to your new definition: type A a b c d -.a2> view A NeedsA f f2 f3 g +scratch/a2> view A NeedsA f f2 f3 g type A a b c d - = B b + = A a | D d | E a d + | B b | C c - | A a structural type NeedsA a b - = Zoink Text - | NeedsA (A a b Nat Nat) + = NeedsA (A a b Nat Nat) + | Zoink Text f : A Nat Nat Nat Nat -> Nat f = cases @@ -104,7 +107,7 @@ Let's do the update now, and verify that the definitions all look good and there D n -> n _ -> 43 -.a2> todo +scratch/a2> todo @@ -140,7 +143,7 @@ combine r = uno r + dos r ``` ```ucm -.a3> add +scratch/r1> add ⍟ I've added these definitions: @@ -153,6 +156,13 @@ combine r = uno r + dos r Rec.uno.set : Nat -> Rec -> Rec combine : Rec -> Nat +scratch/r1> branch r2 + + Done. I've created the r2 branch based off of r1. + + Tip: To merge your work back into the r1 branch, first + `switch /r1` then `merge /r2`. + ``` ```unison structural type Rec = { uno : Nat, dos : Nat, tres : Text } @@ -187,11 +197,7 @@ structural type Rec = { uno : Nat, dos : Nat, tres : Text } And checking that after updating this record, there's nothing `todo`: ```ucm -.> fork a3 a4 - - Done. - -.a4> update.old +scratch/r2> update.old ⍟ I've added these definitions: @@ -209,7 +215,7 @@ And checking that after updating this record, there's nothing `todo`: Rec.uno.modify : (Nat ->{g} Nat) -> Rec ->{g} Rec Rec.uno.set : Nat -> Rec -> Rec -.a4> todo +scratch/r2> todo diff --git a/unison-src/transcripts/fix2268.md b/unison-src/transcripts/fix2268.md index 504e2da73..0892d924e 100644 --- a/unison-src/transcripts/fix2268.md +++ b/unison-src/transcripts/fix2268.md @@ -3,7 +3,7 @@ inferred types that didn't contain arrows, so effects that just yield a value weren't getting disambiguated. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2334.md b/unison-src/transcripts/fix2334.md index 0bc9a2d7d..9044000b5 100644 --- a/unison-src/transcripts/fix2334.md +++ b/unison-src/transcripts/fix2334.md @@ -3,7 +3,7 @@ Tests an issue where pattern matching matrices involving built-in types was discarding default cases in some branches. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2344.md b/unison-src/transcripts/fix2344.md index 6dd1e0ca2..2593c2f18 100644 --- a/unison-src/transcripts/fix2344.md +++ b/unison-src/transcripts/fix2344.md @@ -5,7 +5,7 @@ The binds were causing some sequences of lets to be unnecessarily recursive. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2353.md b/unison-src/transcripts/fix2353.md index 50d0827a6..f9662633c 100644 --- a/unison-src/transcripts/fix2353.md +++ b/unison-src/transcripts/fix2353.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2354.md b/unison-src/transcripts/fix2354.md index 7346e368c..f8a637022 100644 --- a/unison-src/transcripts/fix2354.md +++ b/unison-src/transcripts/fix2354.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Tests that delaying an un-annotated higher-rank type gives a normal diff --git a/unison-src/transcripts/fix2355.md b/unison-src/transcripts/fix2355.md index 25f4840b3..a9b22fc3f 100644 --- a/unison-src/transcripts/fix2355.md +++ b/unison-src/transcripts/fix2355.md @@ -2,7 +2,7 @@ Tests for a loop that was previously occurring in the type checker. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:error diff --git a/unison-src/transcripts/fix2378.md b/unison-src/transcripts/fix2378.md index d4358c26e..586e6335c 100644 --- a/unison-src/transcripts/fix2378.md +++ b/unison-src/transcripts/fix2378.md @@ -4,7 +4,7 @@ checking wanted vs. provided abilities. It was necessary to re-check rows until a fixed point is reached. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2423.md b/unison-src/transcripts/fix2423.md index 4f5d073c0..72b345055 100644 --- a/unison-src/transcripts/fix2423.md +++ b/unison-src/transcripts/fix2423.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2474.md b/unison-src/transcripts/fix2474.md index a718719bd..3d48be95b 100644 --- a/unison-src/transcripts/fix2474.md +++ b/unison-src/transcripts/fix2474.md @@ -18,7 +18,7 @@ should be typed in the following way: the ability that contains `e`. ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2474.output.md b/unison-src/transcripts/fix2474.output.md index 7f6472f09..f023e162b 100644 --- a/unison-src/transcripts/fix2474.output.md +++ b/unison-src/transcripts/fix2474.output.md @@ -18,7 +18,7 @@ should be typed in the following way: the ability that contains `e`. ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. diff --git a/unison-src/transcripts/fix2628.md b/unison-src/transcripts/fix2628.md index 5c3ec8df5..cef5bd4a9 100644 --- a/unison-src/transcripts/fix2628.md +++ b/unison-src/transcripts/fix2628.md @@ -1,5 +1,5 @@ ```ucm:hide -.> alias.type ##Nat .base.Nat +scratch/main> alias.type ##Nat lib.base.Nat ``` ```unison:hide @@ -9,7 +9,7 @@ unique type foo.bar.baz.MyRecord = { ``` ```ucm -.> add +scratch/main> add -.> find : Nat -> MyRecord +scratch/main> find : Nat -> MyRecord ``` diff --git a/unison-src/transcripts/fix2628.output.md b/unison-src/transcripts/fix2628.output.md index 64b45ed29..6dba18bfa 100644 --- a/unison-src/transcripts/fix2628.output.md +++ b/unison-src/transcripts/fix2628.output.md @@ -5,7 +5,7 @@ unique type foo.bar.baz.MyRecord = { ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -18,7 +18,7 @@ unique type foo.bar.baz.MyRecord = { -> MyRecord -> MyRecord -.> find : Nat -> MyRecord +scratch/main> find : Nat -> MyRecord 1. foo.bar.baz.MyRecord.MyRecord : Nat -> MyRecord diff --git a/unison-src/transcripts/fix2663.md b/unison-src/transcripts/fix2663.md index 6d2ccd724..e3b88b062 100644 --- a/unison-src/transcripts/fix2663.md +++ b/unison-src/transcripts/fix2663.md @@ -8,7 +8,7 @@ After pattern compilation, the match would end up: and z would end up referring to the first p3 rather than the second. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2693.md b/unison-src/transcripts/fix2693.md index 947e35b70..2bd2a0082 100644 --- a/unison-src/transcripts/fix2693.md +++ b/unison-src/transcripts/fix2693.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -14,7 +14,7 @@ range = loop [] ``` ```ucm -.> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts/fix2693.output.md b/unison-src/transcripts/fix2693.output.md index 22a46bec2..7bb6d6088 100644 --- a/unison-src/transcripts/fix2693.output.md +++ b/unison-src/transcripts/fix2693.output.md @@ -24,7 +24,7 @@ range = loop [] ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/fix2712.md b/unison-src/transcripts/fix2712.md index fce751166..4483f00bd 100644 --- a/unison-src/transcripts/fix2712.md +++ b/unison-src/transcripts/fix2712.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -10,7 +10,7 @@ mapWithKey f m = Tip ``` ```ucm -.> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts/fix2712.output.md b/unison-src/transcripts/fix2712.output.md index 08cdb89a3..f691d22dc 100644 --- a/unison-src/transcripts/fix2712.output.md +++ b/unison-src/transcripts/fix2712.output.md @@ -20,7 +20,7 @@ mapWithKey f m = Tip ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/fix2795.md b/unison-src/transcripts/fix2795.md index d4b61c99b..1e2ca1764 100644 --- a/unison-src/transcripts/fix2795.md +++ b/unison-src/transcripts/fix2795.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.mergeio -.> load unison-src/transcripts/fix2795/docs.u -.> display test +scratch/main> builtins.mergeio +scratch/main> load unison-src/transcripts/fix2795/docs.u +scratch/main> display test ``` diff --git a/unison-src/transcripts/fix2795.output.md b/unison-src/transcripts/fix2795.output.md index 13a789f03..09ae558fc 100644 --- a/unison-src/transcripts/fix2795.output.md +++ b/unison-src/transcripts/fix2795.output.md @@ -1,9 +1,9 @@ ```ucm -.> builtins.mergeio +scratch/main> builtins.mergeio Done. -.> load unison-src/transcripts/fix2795/docs.u +scratch/main> load unison-src/transcripts/fix2795/docs.u Loading changes detected in unison-src/transcripts/fix2795/docs.u. @@ -17,7 +17,7 @@ t1 : Text test : Doc2 -.> display test +scratch/main> display test t : Text t = "hi" diff --git a/unison-src/transcripts/fix2840.md b/unison-src/transcripts/fix2840.md index be481b5bb..518f90c45 100644 --- a/unison-src/transcripts/fix2840.md +++ b/unison-src/transcripts/fix2840.md @@ -1,7 +1,7 @@ This bugfix addresses an issue where embedded Unison code in UCM was expected to be present in the active codebase when the `display` command was used render `Doc` values. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` First, a few \[hidden] definitions necessary for typechecking a simple Doc2. @@ -63,7 +63,7 @@ syntax.docWord = Word ``` ```ucm -.> add +scratch/main> add ``` Next, define and display a simple Doc: @@ -74,7 +74,7 @@ Hi ``` ```ucm -.> display README +scratch/main> display README ``` Previously, the error was: diff --git a/unison-src/transcripts/fix2840.output.md b/unison-src/transcripts/fix2840.output.md index c47df9a2c..ab59e8f1e 100644 --- a/unison-src/transcripts/fix2840.output.md +++ b/unison-src/transcripts/fix2840.output.md @@ -3,7 +3,7 @@ This bugfix addresses an issue where embedded Unison code in UCM was expected to First, a few \[hidden] definitions necessary for typechecking a simple Doc2. ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -25,7 +25,7 @@ Hi ``` ```ucm -.> display README +scratch/main> display README Hi diff --git a/unison-src/transcripts/fix2970.md b/unison-src/transcripts/fix2970.md index d9a6a6b53..efcd59f18 100644 --- a/unison-src/transcripts/fix2970.md +++ b/unison-src/transcripts/fix2970.md @@ -1,7 +1,7 @@ Also fixes #1519 (it's the same issue). ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix2970.output.md b/unison-src/transcripts/fix2970.output.md index 904508e2c..52d017e84 100644 --- a/unison-src/transcripts/fix2970.output.md +++ b/unison-src/transcripts/fix2970.output.md @@ -1,7 +1,7 @@ Also fixes #1519 (it's the same issue). ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. diff --git a/unison-src/transcripts/fix3037.md b/unison-src/transcripts/fix3037.md index c16c1f284..af8fed981 100644 --- a/unison-src/transcripts/fix3037.md +++ b/unison-src/transcripts/fix3037.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Tests for an unsound case of ability checking that was erroneously being diff --git a/unison-src/transcripts/fix3171.md b/unison-src/transcripts/fix3171.md index 62790dd1a..ad166c7f5 100644 --- a/unison-src/transcripts/fix3171.md +++ b/unison-src/transcripts/fix3171.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Tests an case where decompiling could cause function arguments to occur in the diff --git a/unison-src/transcripts/fix3196.md b/unison-src/transcripts/fix3196.md index d04592aa6..46755570e 100644 --- a/unison-src/transcripts/fix3196.md +++ b/unison-src/transcripts/fix3196.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Tests ability checking in scenarios where one side is concrete and the other is diff --git a/unison-src/transcripts/fix3215.md b/unison-src/transcripts/fix3215.md index af0e67e86..a0d1715a1 100644 --- a/unison-src/transcripts/fix3215.md +++ b/unison-src/transcripts/fix3215.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Tests a case where concrete abilities were appearing multiple times in an diff --git a/unison-src/transcripts/fix3244.md b/unison-src/transcripts/fix3244.md index 0ae745e89..e07581e2e 100644 --- a/unison-src/transcripts/fix3244.md +++ b/unison-src/transcripts/fix3244.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This tests an previously erroneous case in the pattern compiler. It was assuming diff --git a/unison-src/transcripts/fix3265.md b/unison-src/transcripts/fix3265.md index fcf9ce8fb..5b0655111 100644 --- a/unison-src/transcripts/fix3265.md +++ b/unison-src/transcripts/fix3265.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Tests cases that produced bad decompilation output previously. There diff --git a/unison-src/transcripts/fix3634.md b/unison-src/transcripts/fix3634.md index 0cb5f88dd..fd1654739 100644 --- a/unison-src/transcripts/fix3634.md +++ b/unison-src/transcripts/fix3634.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` @@ -16,6 +16,6 @@ d = {{ ``` ```ucm -.> add -.> display d +scratch/main> add +scratch/main> display d ``` \ No newline at end of file diff --git a/unison-src/transcripts/fix3634.output.md b/unison-src/transcripts/fix3634.output.md index 46f009f8c..8648dd1cf 100644 --- a/unison-src/transcripts/fix3634.output.md +++ b/unison-src/transcripts/fix3634.output.md @@ -26,7 +26,7 @@ d = {{ ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -34,7 +34,7 @@ d = {{ (also named builtin.Optional) d : Doc2 -.> display d +scratch/main> display d `x -> J x` diff --git a/unison-src/transcripts/fix3678.md b/unison-src/transcripts/fix3678.md index 13bed5d26..59ecfe787 100644 --- a/unison-src/transcripts/fix3678.md +++ b/unison-src/transcripts/fix3678.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Array comparison was indexing out of bounds. diff --git a/unison-src/transcripts/fix3752.md b/unison-src/transcripts/fix3752.md index 72979087f..90fc20743 100644 --- a/unison-src/transcripts/fix3752.md +++ b/unison-src/transcripts/fix3752.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` These were failing to type check before, because id was not diff --git a/unison-src/transcripts/fix3759.md b/unison-src/transcripts/fix3759.md index 63047bc91..212bae665 100644 --- a/unison-src/transcripts/fix3759.md +++ b/unison-src/transcripts/fix3759.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison:hide @@ -14,7 +14,7 @@ Woot.frobnicate = 43 ``` ```ucm:hide -.> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts/fix3773.md b/unison-src/transcripts/fix3773.md index 1a0ab22c7..991db6991 100644 --- a/unison-src/transcripts/fix3773.md +++ b/unison-src/transcripts/fix3773.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix4172.md b/unison-src/transcripts/fix4172.md index 2c7d6c3b1..faaa93475 100644 --- a/unison-src/transcripts/fix4172.md +++ b/unison-src/transcripts/fix4172.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -17,8 +17,8 @@ allowDebug = debug [1,2,3] ``` ```ucm -.> add -.> test +scratch/main> add +scratch/main> test ``` ```unison @@ -26,6 +26,6 @@ bool = false ``` ```ucm:error -.> update.old -.> test +scratch/main> update.old +scratch/main> test ``` diff --git a/unison-src/transcripts/fix4172.output.md b/unison-src/transcripts/fix4172.output.md index 2216b286d..da56c3940 100644 --- a/unison-src/transcripts/fix4172.output.md +++ b/unison-src/transcripts/fix4172.output.md @@ -36,7 +36,7 @@ allowDebug = debug [1,2,3] ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -45,7 +45,7 @@ allowDebug = debug [1,2,3] debug : a -> Text t1 : [Result] -.> test +scratch/main> test Cached test results (`help testcache` to learn more) @@ -75,13 +75,13 @@ bool = false ``` ```ucm -.> update.old +scratch/main> update.old ⍟ I've updated these names to your new definition: bool : Boolean -.> test +scratch/main> test ✅ diff --git a/unison-src/transcripts/fix4280.md b/unison-src/transcripts/fix4280.md index f4cf09a01..d994a4259 100644 --- a/unison-src/transcripts/fix4280.md +++ b/unison-src/transcripts/fix4280.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix4424.md b/unison-src/transcripts/fix4424.md index 19963478f..8fb4d14ba 100644 --- a/unison-src/transcripts/fix4424.md +++ b/unison-src/transcripts/fix4424.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Some basics: @@ -13,7 +13,7 @@ countCat = cases ``` ```ucm -.> add +scratch/main> add ``` Now I want to add a constructor. @@ -23,5 +23,5 @@ unique type Rat.Dog = Bird | Mouse ``` ```ucm -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/fix4424.output.md b/unison-src/transcripts/fix4424.output.md index bb00ce730..dbf505ced 100644 --- a/unison-src/transcripts/fix4424.output.md +++ b/unison-src/transcripts/fix4424.output.md @@ -9,7 +9,7 @@ countCat = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -25,7 +25,7 @@ unique type Rat.Dog = Bird | Mouse ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/fix4498.md b/unison-src/transcripts/fix4498.md index d1781e2e3..5e8918b30 100644 --- a/unison-src/transcripts/fix4498.md +++ b/unison-src/transcripts/fix4498.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -10,7 +10,7 @@ myterm = foo + 2 ``` ```ucm -.> add -.> view myterm +scratch/main> add +scratch/main> view myterm ``` diff --git a/unison-src/transcripts/fix4498.output.md b/unison-src/transcripts/fix4498.output.md index e13c5f8f0..fb5bbd771 100644 --- a/unison-src/transcripts/fix4498.output.md +++ b/unison-src/transcripts/fix4498.output.md @@ -22,7 +22,7 @@ myterm = foo + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -31,7 +31,7 @@ myterm = foo + 2 lib.dep0.zonk.foo : Text myterm : Nat -.> view myterm +scratch/main> view myterm myterm : Nat myterm = diff --git a/unison-src/transcripts/fix4556.md b/unison-src/transcripts/fix4556.md index d4775b587..1a0bbe25d 100644 --- a/unison-src/transcripts/fix4556.md +++ b/unison-src/transcripts/fix4556.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -10,7 +10,7 @@ hey = foo.hello ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -18,5 +18,5 @@ thing = 2 ``` ```ucm -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/fix4556.output.md b/unison-src/transcripts/fix4556.output.md index d65321a31..2b4add6ca 100644 --- a/unison-src/transcripts/fix4556.output.md +++ b/unison-src/transcripts/fix4556.output.md @@ -22,7 +22,7 @@ hey = foo.hello ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,7 +51,7 @@ thing = 2 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/fix4592.md b/unison-src/transcripts/fix4592.md index cf272e194..1118a281f 100644 --- a/unison-src/transcripts/fix4592.md +++ b/unison-src/transcripts/fix4592.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison diff --git a/unison-src/transcripts/fix4618.md b/unison-src/transcripts/fix4618.md index 3755f1099..1d69f1ac5 100644 --- a/unison-src/transcripts/fix4618.md +++ b/unison-src/transcripts/fix4618.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -8,7 +8,7 @@ unique type Bugs.Zonk = Bugs ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -17,5 +17,5 @@ unique type Bugs = ``` ```ucm -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/fix4618.output.md b/unison-src/transcripts/fix4618.output.md index ee988cf57..0b6a3921d 100644 --- a/unison-src/transcripts/fix4618.output.md +++ b/unison-src/transcripts/fix4618.output.md @@ -18,7 +18,7 @@ unique type Bugs.Zonk = Bugs ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -50,7 +50,7 @@ unique type Bugs = ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/fix4722.md b/unison-src/transcripts/fix4722.md index e674df56b..983e324f7 100644 --- a/unison-src/transcripts/fix4722.md +++ b/unison-src/transcripts/fix4722.md @@ -9,7 +9,7 @@ expected type into each case, allowing top-level annotations to act like annotations on each case. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/fix4780.md b/unison-src/transcripts/fix4780.md index a8fad4144..f1ebdad56 100644 --- a/unison-src/transcripts/fix4780.md +++ b/unison-src/transcripts/fix4780.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Just a simple test case to see whether partially applied diff --git a/unison-src/transcripts/fix4898.md b/unison-src/transcripts/fix4898.md index 9bc68041b..6d618d82b 100644 --- a/unison-src/transcripts/fix4898.md +++ b/unison-src/transcripts/fix4898.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -11,7 +11,7 @@ redouble x = double x + double x ``` ```ucm -.> add -.> dependents double -.> delete.term 1 +scratch/main> add +scratch/main> dependents double +scratch/main> delete.term 1 ``` diff --git a/unison-src/transcripts/fix4898.output.md b/unison-src/transcripts/fix4898.output.md index dceafc4cb..c348778f2 100644 --- a/unison-src/transcripts/fix4898.output.md +++ b/unison-src/transcripts/fix4898.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -27,14 +27,14 @@ redouble x = double x + double x ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: double : Int -> Int redouble : Int -> Int -.> dependents double +scratch/main> dependents double Dependents of: double @@ -45,7 +45,7 @@ redouble x = double x + double x Tip: Try `view 1` to see the source of any numbered item in the above list. -.> delete.term 1 +scratch/main> delete.term 1 Done. diff --git a/unison-src/transcripts/fix614.md b/unison-src/transcripts/fix614.md index 3e0ad6c76..3bc69c27c 100644 --- a/unison-src/transcripts/fix614.md +++ b/unison-src/transcripts/fix614.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This transcript demonstrates that Unison forces actions in blocks to have a return type of `()`. @@ -16,7 +16,7 @@ ex1 = do ``` ```ucm:hide -.> add +scratch/main> add ``` This does not typecheck, we've accidentally underapplied `Stream.emit`: diff --git a/unison-src/transcripts/fix689.md b/unison-src/transcripts/fix689.md index b22106eed..a75468b28 100644 --- a/unison-src/transcripts/fix689.md +++ b/unison-src/transcripts/fix689.md @@ -1,7 +1,7 @@ Tests the fix for https://github.com/unisonweb/unison/issues/689 ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ``` unison diff --git a/unison-src/transcripts/fix693.md b/unison-src/transcripts/fix693.md index bcb714af9..f45d2eab1 100644 --- a/unison-src/transcripts/fix693.md +++ b/unison-src/transcripts/fix693.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -12,7 +12,7 @@ structural ability Abort where ``` ```ucm -.> add +scratch/main> add ``` This code should not type check. The match on X.x ought to introduce a diff --git a/unison-src/transcripts/fix693.output.md b/unison-src/transcripts/fix693.output.md index 6d869d63a..a5d037737 100644 --- a/unison-src/transcripts/fix693.output.md +++ b/unison-src/transcripts/fix693.output.md @@ -22,7 +22,7 @@ structural ability Abort where ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/fix845.md b/unison-src/transcripts/fix845.md index 4e361ca7c..99e426245 100644 --- a/unison-src/transcripts/fix845.md +++ b/unison-src/transcripts/fix845.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Add `List.zonk` to the codebase: @@ -14,7 +14,7 @@ Text.zonk txt = txt ++ "!! " ``` ```ucm:hide -.> add +scratch/main> add ``` Now, typecheck a file with a reference to `Blah.zonk` (which doesn't exist in the codebase). This should fail: diff --git a/unison-src/transcripts/fix849.md b/unison-src/transcripts/fix849.md index 4d111f9cc..63c40e821 100644 --- a/unison-src/transcripts/fix849.md +++ b/unison-src/transcripts/fix849.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` See [this ticket](https://github.com/unisonweb/unison/issues/849). diff --git a/unison-src/transcripts/fix942.md b/unison-src/transcripts/fix942.md index 5c12cb8c0..5cbf16ffb 100644 --- a/unison-src/transcripts/fix942.md +++ b/unison-src/transcripts/fix942.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` First we add some code: @@ -11,7 +11,7 @@ z = y + 2 ``` ```ucm -.> add +scratch/main> add ``` Now we edit `x` to be `7`, which should make `z` equal `10`: @@ -21,8 +21,8 @@ x = 7 ``` ```ucm -.> update -.> view x y z +scratch/main> update +scratch/main> view x y z ``` Uh oh! `z` is still referencing the old version. Just to confirm: @@ -32,6 +32,6 @@ test> t1 = if z == 3 then [Fail "nooo!!!"] else [Ok "great"] ``` ```ucm -.> add -.> test +scratch/main> add +scratch/main> test ``` diff --git a/unison-src/transcripts/fix942.output.md b/unison-src/transcripts/fix942.output.md index 694cf4342..68ec09bba 100644 --- a/unison-src/transcripts/fix942.output.md +++ b/unison-src/transcripts/fix942.output.md @@ -22,7 +22,7 @@ z = y + 2 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -52,7 +52,7 @@ x = 7 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -63,7 +63,7 @@ x = 7 Done. -.> view x y z +scratch/main> view x y z x : Nat x = 7 @@ -106,13 +106,13 @@ test> t1 = if z == 3 then [Fail "nooo!!!"] else [Ok "great"] ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: t1 : [Result] -.> test +scratch/main> test Cached test results (`help testcache` to learn more) diff --git a/unison-src/transcripts/fix987.md b/unison-src/transcripts/fix987.md index 0db69b1d7..5eb2a73bb 100644 --- a/unison-src/transcripts/fix987.md +++ b/unison-src/transcripts/fix987.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` First we'll add a definition: @@ -18,7 +18,7 @@ spaceAttack1 x = Add it to the codebase: ```ucm -.> add +scratch/main> add ``` Now we'll try to add a different definition that runs the actions in a different order. This should work fine: @@ -31,7 +31,7 @@ spaceAttack2 x = ``` ```ucm -.> add +scratch/main> add ``` Previously, this would fail because the hashing algorithm was being given one big let rec block whose binding order was normalized. diff --git a/unison-src/transcripts/fix987.output.md b/unison-src/transcripts/fix987.output.md index 5f6119c22..50d747862 100644 --- a/unison-src/transcripts/fix987.output.md +++ b/unison-src/transcripts/fix987.output.md @@ -28,7 +28,7 @@ spaceAttack1 x = Add it to the codebase: ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -59,7 +59,7 @@ spaceAttack2 x = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/formatter.md b/unison-src/transcripts/formatter.md index 3848c0ba9..d2a921b2f 100644 --- a/unison-src/transcripts/formatter.md +++ b/unison-src/transcripts/formatter.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -88,7 +88,7 @@ with a strike-through block~ ``` ```ucm -.> debug.format +scratch/main> debug.format ``` Formatter should leave things alone if the file doesn't typecheck. @@ -98,5 +98,5 @@ brokenDoc = {{ hello }} + 1 ``` ```ucm -.> debug.format +scratch/main> debug.format ``` diff --git a/unison-src/transcripts/formatter.output.md b/unison-src/transcripts/formatter.output.md index 5ddf656af..ce931ed31 100644 --- a/unison-src/transcripts/formatter.output.md +++ b/unison-src/transcripts/formatter.output.md @@ -84,7 +84,7 @@ with a strike-through block~ ``` ```ucm -.> debug.format +scratch/main> debug.format ``` ```unison:added-by-ucm scratch.u @@ -200,6 +200,6 @@ brokenDoc = {{ hello }} + 1 ``` ```ucm -.> debug.format +scratch/main> debug.format ``` diff --git a/unison-src/transcripts/fuzzy-options.md b/unison-src/transcripts/fuzzy-options.md index 13d953c93..e460ce923 100644 --- a/unison-src/transcripts/fuzzy-options.md +++ b/unison-src/transcripts/fuzzy-options.md @@ -5,14 +5,14 @@ If an argument is required but doesn't have a fuzzy resolver, the command should ```ucm:error -- The second argument of move.term is a 'new-name' and doesn't have a fuzzy resolver -.> move.term +scratch/main> move.term ``` If a fuzzy resolver doesn't have any options available it should print a message instead of opening an empty fuzzy-select. ```ucm:error -.empty> view +scratch/empty> view ``` @@ -25,21 +25,21 @@ nested.optionTwo = 2 Definition args ```ucm -.> add -.> debug.fuzzy-options view _ +scratch/main> add +scratch/main> debug.fuzzy-options view _ ``` Namespace args ```ucm -.> add -.> debug.fuzzy-options find-in _ +scratch/main> add +scratch/main> debug.fuzzy-options find-in _ ``` Project Branch args ```ucm myproject/main> branch mybranch -.> debug.fuzzy-options switch _ +scratch/main> debug.fuzzy-options switch _ ``` diff --git a/unison-src/transcripts/fuzzy-options.output.md b/unison-src/transcripts/fuzzy-options.output.md index f48f5cd6f..290d07aab 100644 --- a/unison-src/transcripts/fuzzy-options.output.md +++ b/unison-src/transcripts/fuzzy-options.output.md @@ -5,7 +5,7 @@ If an argument is required but doesn't have a fuzzy resolver, the command should ```ucm -- The second argument of move.term is a 'new-name' and doesn't have a fuzzy resolver -.> move.term +scratch/main> move.term `move.term foo bar` renames `foo` to `bar`. @@ -14,9 +14,7 @@ If a fuzzy resolver doesn't have any options available it should print a message opening an empty fuzzy-select. ```ucm - ☝️ The namespace .empty is empty. - -.empty> view +scratch/empty> view ⚠️ @@ -32,16 +30,14 @@ nested.optionTwo = 2 Definition args ```ucm - ☝️ The namespace . is empty. - -.> add +scratch/main> add ⍟ I've added these definitions: nested.optionTwo : ##Nat optionOne : ##Nat -.> debug.fuzzy-options view _ +scratch/main> debug.fuzzy-options view _ Select a definition to view: * optionOne @@ -51,12 +47,12 @@ Definition args Namespace args ```ucm -.> add +scratch/main> add ⊡ Ignored previously added definitions: nested.optionTwo optionOne -.> debug.fuzzy-options find-in _ +scratch/main> debug.fuzzy-options find-in _ Select a namespace: * nested @@ -72,11 +68,14 @@ myproject/main> branch mybranch Tip: To merge your work back into the main branch, first `switch /main` then `merge /mybranch`. -.> debug.fuzzy-options switch _ +scratch/main> debug.fuzzy-options switch _ Select a project or branch to switch to: * myproject/main * myproject/mybranch + * scratch/empty + * scratch/main * myproject + * scratch ``` diff --git a/unison-src/transcripts/hello.md b/unison-src/transcripts/hello.md index 187eb86ec..4c72096ff 100644 --- a/unison-src/transcripts/hello.md +++ b/unison-src/transcripts/hello.md @@ -2,7 +2,7 @@ # Hello! ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This markdown file is also a Unison transcript file. Transcript files are an easy way to create self-documenting Unison programs, libraries, and tutorials. @@ -33,8 +33,8 @@ x = 42 Let's go ahead and add that to the codebase, then make sure it's there: ```ucm -.> add -.> view x +scratch/main> add +scratch/main> view x ``` If `view` returned no results, the transcript would fail at this point. @@ -50,7 +50,7 @@ y = 99 This works for `ucm` blocks as well. ```ucm:hide -.> rename.term x answerToUltimateQuestionOfLife +scratch/main> rename.term x answerToUltimateQuestionOfLife ``` Doing `unison:hide:all` hides the block altogether, both input and output - this is useful for doing behind-the-scenes control of `ucm`'s state. diff --git a/unison-src/transcripts/hello.output.md b/unison-src/transcripts/hello.output.md index 8104114e0..e6d03ea95 100644 --- a/unison-src/transcripts/hello.output.md +++ b/unison-src/transcripts/hello.output.md @@ -48,13 +48,13 @@ x = 42 Let's go ahead and add that to the codebase, then make sure it's there: ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: x : Nat -.> view x +scratch/main> view x x : Nat x = 42 diff --git a/unison-src/transcripts/higher-rank.md b/unison-src/transcripts/higher-rank.md index 7fe63de50..6645e456a 100644 --- a/unison-src/transcripts/higher-rank.md +++ b/unison-src/transcripts/higher-rank.md @@ -2,9 +2,9 @@ This transcript does some testing of higher-rank types. Regression tests related to higher-rank types can be added here. ```ucm:hide -.> alias.type ##Nat Nat -.> alias.type ##Text Text -.> alias.type ##IO IO +scratch/main> alias.type ##Nat Nat +scratch/main> alias.type ##Text Text +scratch/main> alias.type ##IO IO ``` In this example, a higher-rank function is defined, `f`. No annotation is needed at the call-site of `f`, because the lambda is being checked against the polymorphic type `forall a . a -> a`, rather than inferred: diff --git a/unison-src/transcripts/io-test-command.md b/unison-src/transcripts/io-test-command.md index 98d55a3da..f10259137 100644 --- a/unison-src/transcripts/io-test-command.md +++ b/unison-src/transcripts/io-test-command.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` The `io.test` command should run all of the tests within the current namespace, excluding libs. @@ -20,24 +20,24 @@ lib.ioAndExceptionTestInLib = do ``` ```ucm:hide -.> add +scratch/main> add ``` Run a IO tests one by one ```ucm -.> io.test ioAndExceptionTest -.> io.test ioTest +scratch/main> io.test ioAndExceptionTest +scratch/main> io.test ioTest ``` `io.test` doesn't cache results ```ucm -.> io.test ioAndExceptionTest +scratch/main> io.test ioAndExceptionTest ``` `io.test.all` will run all matching tests except those in the `lib` namespace. ```ucm -.> io.test.all +scratch/main> io.test.all ``` diff --git a/unison-src/transcripts/io-test-command.output.md b/unison-src/transcripts/io-test-command.output.md index 5a792b1d9..ec848f23d 100644 --- a/unison-src/transcripts/io-test-command.output.md +++ b/unison-src/transcripts/io-test-command.output.md @@ -18,7 +18,7 @@ lib.ioAndExceptionTestInLib = do Run a IO tests one by one ```ucm -.> io.test ioAndExceptionTest +scratch/main> io.test ioAndExceptionTest New test results: @@ -28,7 +28,7 @@ Run a IO tests one by one Tip: Use view 1 to view the source of a test. -.> io.test ioTest +scratch/main> io.test ioTest New test results: @@ -42,7 +42,7 @@ Run a IO tests one by one `io.test` doesn't cache results ```ucm -.> io.test ioAndExceptionTest +scratch/main> io.test ioAndExceptionTest New test results: @@ -56,7 +56,7 @@ Run a IO tests one by one `io.test.all` will run all matching tests except those in the `lib` namespace. ```ucm -.> io.test.all +scratch/main> io.test.all diff --git a/unison-src/transcripts/io.md b/unison-src/transcripts/io.md index 4caedaef0..0051c7aa6 100644 --- a/unison-src/transcripts/io.md +++ b/unison-src/transcripts/io.md @@ -1,10 +1,10 @@ # tests for built-in IO functions ```ucm:hide -.> builtins.merge -.> builtins.mergeio -.> load unison-src/transcripts-using-base/base.u -.> add +scratch/main> builtins.merge +scratch/main> builtins.mergeio +scratch/main> load unison-src/transcripts-using-base/base.u +scratch/main> add ``` Tests for IO builtins which wired to foreign haskell calls. @@ -17,7 +17,7 @@ TempDirs/autoCleaned is an ability/hanlder which allows you to easily create a scratch directory which will automatically get cleaned up. ```ucm:hide -.> add +scratch/main> add ``` ## Basic File Functions @@ -57,8 +57,8 @@ testCreateRename _ = ``` ```ucm -.> add -.> io.test testCreateRename +scratch/main> add +scratch/main> io.test testCreateRename ``` ### Opening / Closing files @@ -107,8 +107,8 @@ testOpenClose _ = ``` ```ucm -.> add -.> io.test testOpenClose +scratch/main> add +scratch/main> io.test testOpenClose ``` ### Reading files with getSomeBytes @@ -166,8 +166,8 @@ testGetSomeBytes _ = ``` ```ucm -.> add -.> io.test testGetSomeBytes +scratch/main> add +scratch/main> io.test testGetSomeBytes ``` ### Seeking in open files @@ -240,9 +240,9 @@ testAppend _ = ``` ```ucm -.> add -.> io.test testSeek -.> io.test testAppend +scratch/main> add +scratch/main> io.test testSeek +scratch/main> io.test testAppend ``` ### SystemTime @@ -257,8 +257,8 @@ testSystemTime _ = ``` ```ucm -.> add -.> io.test testSystemTime +scratch/main> add +scratch/main> io.test testSystemTime ``` ### Get temp directory @@ -274,8 +274,8 @@ testGetTempDirectory _ = ``` ```ucm -.> add -.> io.test testGetTempDirectory +scratch/main> add +scratch/main> io.test testGetTempDirectory ``` ### Get current directory @@ -291,8 +291,8 @@ testGetCurrentDirectory _ = ``` ```ucm -.> add -.> io.test testGetCurrentDirectory +scratch/main> add +scratch/main> io.test testGetCurrentDirectory ``` ### Get directory contents @@ -310,8 +310,8 @@ testDirContents _ = ``` ```ucm -.> add -.> io.test testDirContents +scratch/main> add +scratch/main> io.test testDirContents ``` ### Read environment variables @@ -328,8 +328,8 @@ testGetEnv _ = runTest test ``` ```ucm -.> add -.> io.test testGetEnv +scratch/main> add +scratch/main> io.test testGetEnv ``` ### Read command line args @@ -368,27 +368,27 @@ testGetArgs.runMeWithTwoArgs = 'let Test that they can be run with the right number of args. ```ucm -.> add -.> run runMeWithNoArgs -.> run runMeWithOneArg foo -.> run runMeWithTwoArgs foo bar +scratch/main> add +scratch/main> run runMeWithNoArgs +scratch/main> run runMeWithOneArg foo +scratch/main> run runMeWithTwoArgs foo bar ``` Calling our examples with the wrong number of args will error. ```ucm:error -.> run runMeWithNoArgs foo +scratch/main> run runMeWithNoArgs foo ``` ```ucm:error -.> run runMeWithOneArg +scratch/main> run runMeWithOneArg ``` ```ucm:error -.> run runMeWithOneArg foo bar +scratch/main> run runMeWithOneArg foo bar ``` ```ucm:error -.> run runMeWithTwoArgs +scratch/main> run runMeWithTwoArgs ``` ### Get the time zone @@ -401,8 +401,8 @@ testTimeZone = do ``` ```ucm -.> add -.> run testTimeZone +scratch/main> add +scratch/main> run testTimeZone ``` ### Get some random bytes @@ -417,6 +417,6 @@ testRandom = do ``` ```ucm -.> add -.> io.test testGetEnv +scratch/main> add +scratch/main> io.test testGetEnv ``` diff --git a/unison-src/transcripts/io.output.md b/unison-src/transcripts/io.output.md index a45df02d6..cbc177145 100644 --- a/unison-src/transcripts/io.output.md +++ b/unison-src/transcripts/io.output.md @@ -59,13 +59,13 @@ testCreateRename _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testCreateRename : '{IO} [Result] -.> io.test testCreateRename +scratch/main> io.test testCreateRename New test results: @@ -141,13 +141,13 @@ testOpenClose _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testOpenClose : '{IO} [Result] -.> io.test testOpenClose +scratch/main> io.test testOpenClose New test results: @@ -231,13 +231,13 @@ testGetSomeBytes _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testGetSomeBytes : '{IO} [Result] -.> io.test testGetSomeBytes +scratch/main> io.test testGetSomeBytes New test results: @@ -339,14 +339,14 @@ testAppend _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testAppend : '{IO} [Result] testSeek : '{IO} [Result] -.> io.test testSeek +scratch/main> io.test testSeek New test results: @@ -362,7 +362,7 @@ testAppend _ = Tip: Use view 1 to view the source of a test. -.> io.test testAppend +scratch/main> io.test testAppend New test results: @@ -398,13 +398,13 @@ testSystemTime _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testSystemTime : '{IO} [Result] -.> io.test testSystemTime +scratch/main> io.test testSystemTime New test results: @@ -428,13 +428,13 @@ testGetTempDirectory _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testGetTempDirectory : '{IO} [Result] -.> io.test testGetTempDirectory +scratch/main> io.test testGetTempDirectory New test results: @@ -459,13 +459,13 @@ testGetCurrentDirectory _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testGetCurrentDirectory : '{IO} [Result] -.> io.test testGetCurrentDirectory +scratch/main> io.test testGetCurrentDirectory New test results: @@ -492,13 +492,13 @@ testDirContents _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testDirContents : '{IO} [Result] -.> io.test testDirContents +scratch/main> io.test testDirContents New test results: @@ -525,13 +525,13 @@ testGetEnv _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testGetEnv : '{IO} [Result] -.> io.test testGetEnv +scratch/main> io.test testGetEnv New test results: @@ -579,7 +579,7 @@ testGetArgs.runMeWithTwoArgs = 'let Test that they can be run with the right number of args. ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -588,15 +588,15 @@ Test that they can be run with the right number of args. testGetArgs.runMeWithOneArg : '{IO, Exception} () testGetArgs.runMeWithTwoArgs : '{IO, Exception} () -.> run runMeWithNoArgs +scratch/main> run runMeWithNoArgs () -.> run runMeWithOneArg foo +scratch/main> run runMeWithOneArg foo () -.> run runMeWithTwoArgs foo bar +scratch/main> run runMeWithTwoArgs foo bar () @@ -604,7 +604,7 @@ Test that they can be run with the right number of args. Calling our examples with the wrong number of args will error. ```ucm -.> run runMeWithNoArgs foo +scratch/main> run runMeWithNoArgs foo 💔💥 @@ -617,7 +617,7 @@ Calling our examples with the wrong number of args will error. ``` ```ucm -.> run runMeWithOneArg +scratch/main> run runMeWithOneArg 💔💥 @@ -630,7 +630,7 @@ Calling our examples with the wrong number of args will error. ``` ```ucm -.> run runMeWithOneArg foo bar +scratch/main> run runMeWithOneArg foo bar 💔💥 @@ -644,7 +644,7 @@ Calling our examples with the wrong number of args will error. ``` ```ucm -.> run runMeWithTwoArgs +scratch/main> run runMeWithTwoArgs 💔💥 @@ -666,13 +666,13 @@ testTimeZone = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testTimeZone : '{IO} () -.> run testTimeZone +scratch/main> run testTimeZone () @@ -689,13 +689,13 @@ testRandom = do ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: testRandom : '{IO} [Result] -.> io.test testGetEnv +scratch/main> io.test testGetEnv New test results: diff --git a/unison-src/transcripts/kind-inference.md b/unison-src/transcripts/kind-inference.md index f81a3bf95..3af86ae85 100644 --- a/unison-src/transcripts/kind-inference.md +++ b/unison-src/transcripts/kind-inference.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ## A type param cannot have conflicting kind constraints within a single decl diff --git a/unison-src/transcripts/lambdacase.md b/unison-src/transcripts/lambdacase.md index e2e3a557e..a4d1ba96f 100644 --- a/unison-src/transcripts/lambdacase.md +++ b/unison-src/transcripts/lambdacase.md @@ -1,7 +1,7 @@ # Lambda case syntax ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This function takes a single argument and immediately pattern matches on it. As we'll see below, it can be written using `cases` syntax: @@ -13,7 +13,7 @@ isEmpty x = match x with ``` ```ucm:hide -.> add +scratch/main> add ``` Here's the same function written using `cases` syntax: @@ -27,7 +27,7 @@ isEmpty2 = cases Notice that Unison detects this as an alias of `isEmpty`, and if we view `isEmpty` ```ucm -.> view isEmpty +scratch/main> view isEmpty ``` it shows the definition using `cases` syntax opportunistically, even though the code was originally written without that syntax. @@ -47,7 +47,7 @@ merge xs ys = match (xs, ys) with ``` ```ucm -.> add +scratch/main> add ``` And here's a version using `cases`. The patterns are separated by commas: @@ -65,7 +65,7 @@ merge2 = cases Notice that Unison detects this as an alias of `merge`, and if we view `merge` ```ucm -.> view merge +scratch/main> view merge ``` it again shows the definition using the multi-argument `cases` syntax opportunistically, even though the code was originally written without that syntax. @@ -101,8 +101,8 @@ merge3 = cases ``` ```ucm -.> add -.> view merge3 +scratch/main> add +scratch/main> view merge3 ``` This is the same definition written with multiple patterns and not using the `cases` syntax; notice it is considered an alias of `merge3` above. diff --git a/unison-src/transcripts/lambdacase.output.md b/unison-src/transcripts/lambdacase.output.md index efb41cdce..2e55001a9 100644 --- a/unison-src/transcripts/lambdacase.output.md +++ b/unison-src/transcripts/lambdacase.output.md @@ -46,7 +46,7 @@ isEmpty2 = cases Notice that Unison detects this as an alias of `isEmpty`, and if we view `isEmpty` ```ucm -.> view isEmpty +scratch/main> view isEmpty isEmpty : [t] -> Boolean isEmpty = cases @@ -71,7 +71,7 @@ merge xs ys = match (xs, ys) with ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -107,7 +107,7 @@ merge2 = cases Notice that Unison detects this as an alias of `merge`, and if we view `merge` ```ucm -.> view merge +scratch/main> view merge merge : [a] -> [a] -> [a] merge = cases @@ -194,13 +194,13 @@ merge3 = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: merge3 : [a] -> [a] -> [a] -.> view merge3 +scratch/main> view merge3 merge3 : [a] -> [a] -> [a] merge3 = cases diff --git a/unison-src/transcripts/ls-pretty-print-scope-bug.md b/unison-src/transcripts/ls-pretty-print-scope-bug.md deleted file mode 100644 index a8d4cf5ed..000000000 --- a/unison-src/transcripts/ls-pretty-print-scope-bug.md +++ /dev/null @@ -1,44 +0,0 @@ -```unison -unique type Foo = Foo -``` - -```ucm -.a.b> add -.> fork .a.b .c.d.f -.c.g.f> -``` - -```unison -unique type Foo = Foo -``` - -```ucm -.c.g.f> add -.c> -``` - -```unison -foo = .d.f.Foo.Foo -``` - -```ucm -.c> add -``` - -At this point we have: -`.a.b.Foo` -`.c.d.f.Foo` which is equal to `.a.b.Foo` -`.c.g.f.Foo` which is distinct from the other `Foo` types - -```ucm -.> delete .c.d.f.Foo -``` -Once `.c.d.f.Foo` is deleted `.c.foo` should have the type `.a.b.Foo` -when viewed from `.>`, but an unnamed type when viewed from `.c>`, -since referencing `.a.b.Foo` would reference names outside of the -namespace rooted at `.c`. - -```ucm -.> ls c -.c> ls -``` diff --git a/unison-src/transcripts/ls-pretty-print-scope-bug.output.md b/unison-src/transcripts/ls-pretty-print-scope-bug.output.md deleted file mode 100644 index 567a176b6..000000000 --- a/unison-src/transcripts/ls-pretty-print-scope-bug.output.md +++ /dev/null @@ -1,113 +0,0 @@ -```unison -unique type Foo = Foo -``` - -```ucm - - Loading changes detected in scratch.u. - - I found and typechecked these definitions in scratch.u. If you - do an `add` or `update`, here's how your codebase would - change: - - ⍟ These new definitions are ok to `add`: - - type Foo - -``` -```ucm - ☝️ The namespace .a.b is empty. - -.a.b> add - - ⍟ I've added these definitions: - - type Foo - -.> fork .a.b .c.d.f - - Done. - - ☝️ The namespace .c.g.f is empty. - -``` -```unison -unique type Foo = Foo -``` - -```ucm - - Loading changes detected in scratch.u. - - I found and typechecked these definitions in scratch.u. If you - do an `add` or `update`, here's how your codebase would - change: - - ⍟ These new definitions are ok to `add`: - - type Foo - -``` -```ucm -.c.g.f> add - - ⍟ I've added these definitions: - - type Foo - -``` -```unison -foo = .d.f.Foo.Foo -``` - -```ucm - - Loading changes detected in scratch.u. - - I found and typechecked these definitions in scratch.u. If you - do an `add` or `update`, here's how your codebase would - change: - - ⍟ These new definitions are ok to `add`: - - foo : d.f.Foo - -``` -```ucm -.c> add - - ⍟ I've added these definitions: - - foo : d.f.Foo - -``` -At this point we have: -`.a.b.Foo` -`.c.d.f.Foo` which is equal to `.a.b.Foo` -`.c.g.f.Foo` which is distinct from the other `Foo` types - -```ucm -.> delete .c.d.f.Foo - - Done. - -``` -Once `.c.d.f.Foo` is deleted `.c.foo` should have the type `.a.b.Foo` -when viewed from `.>`, but an unnamed type when viewed from `.c>`, -since referencing `.a.b.Foo` would reference names outside of the -namespace rooted at `.c`. - -```ucm -.> ls c - - 1. d/ (1 term) - 2. foo (b.Foo) - 3. g/ (1 term, 1 type) - -.c> ls - - 1. d/ (1 term) - 2. foo (#uj8oalgadr) - 3. g/ (1 term, 1 type) - -``` diff --git a/unison-src/transcripts/lsp-fold-ranges.md b/unison-src/transcripts/lsp-fold-ranges.md index 377c9170d..20dddc386 100644 --- a/unison-src/transcripts/lsp-fold-ranges.md +++ b/unison-src/transcripts/lsp-fold-ranges.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison:hide @@ -29,5 +29,5 @@ test> z = let ``` ```ucm -.> debug.lsp.fold-ranges +scratch/main> debug.lsp.fold-ranges ``` diff --git a/unison-src/transcripts/lsp-fold-ranges.output.md b/unison-src/transcripts/lsp-fold-ranges.output.md index 51f8b4ae9..2b76b3ff4 100644 --- a/unison-src/transcripts/lsp-fold-ranges.output.md +++ b/unison-src/transcripts/lsp-fold-ranges.output.md @@ -24,7 +24,7 @@ test> z = let ``` ```ucm -.> debug.lsp.fold-ranges +scratch/main> debug.lsp.fold-ranges 《{{ Type doc }}》 《structural type Optional a = diff --git a/unison-src/transcripts/merge.md b/unison-src/transcripts/merge.md index d2f1105a2..66f2497e8 100644 --- a/unison-src/transcripts/merge.md +++ b/unison-src/transcripts/merge.md @@ -48,7 +48,7 @@ project/alice> view foo bar ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Basic merge: two identical adds @@ -89,7 +89,7 @@ project/alice> view foo bar ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Simple update propagation @@ -142,7 +142,7 @@ project/alice> display bar ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Update propagation with common dependent @@ -208,7 +208,7 @@ project/alice> display foo ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Propagating an update to an update @@ -278,7 +278,7 @@ project/alice> display foo ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Update + delete isn't (currently) a conflict @@ -323,7 +323,7 @@ project/alice> view foo ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` In a future version, we'd like to give the user a warning at least. @@ -379,7 +379,7 @@ project/alice> view foo bar baz ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## No-op merge (Bob = Alice) @@ -397,7 +397,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## No-op merge (Bob < Alice) @@ -425,7 +425,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Fast-forward merge (Bob > Alice) @@ -453,7 +453,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## No-op merge: merge empty namespace into empty namespace @@ -509,7 +509,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: type error @@ -559,7 +559,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: simple term conflict @@ -624,7 +624,7 @@ project/merge-bob-into-alice> view bar baz ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: simple type conflict @@ -667,7 +667,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: type-update + constructor-rename conflict @@ -710,7 +710,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: constructor-rename conflict @@ -748,7 +748,7 @@ project/alice> merge bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: non-constructor/constructor conflict @@ -789,7 +789,7 @@ project/alice> merge bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge failure: type/type conflict with term/constructor conflict @@ -840,7 +840,7 @@ project/alice> merge bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` Here's a more involved example that demonstrates the same idea. @@ -913,7 +913,7 @@ project/alice> merge bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Merge algorithm quirk: add/add unique types @@ -1108,7 +1108,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Conflict involving builtin @@ -1149,7 +1149,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Constructor alias @@ -1195,7 +1195,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Missing constructor name @@ -1242,7 +1242,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Nested decl alias @@ -1290,7 +1290,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Stray constructor alias @@ -1334,7 +1334,7 @@ project/alice> merge bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Term or type in `lib` @@ -1375,7 +1375,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## LCA precondition violations @@ -1441,7 +1441,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ## Regression tests @@ -1486,7 +1486,7 @@ project/alice> merge /bob ``` ```ucm:hide -.> project.delete project +scratch/main> project.delete project ``` ### Delete a constructor diff --git a/unison-src/transcripts/move-all.md b/unison-src/transcripts/move-all.md index f3a4f5209..ee83aa33a 100644 --- a/unison-src/transcripts/move-all.md +++ b/unison-src/transcripts/move-all.md @@ -1,7 +1,7 @@ # Tests for `move` ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ## Happy Path - namespace, term, and type @@ -16,7 +16,7 @@ unique type Foo.T = T ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -25,16 +25,16 @@ unique type Foo.T = T1 | T2 ``` ```ucm -.> update +scratch/main> update ``` Should be able to move the term, type, and namespace, including its types, terms, and sub-namespaces. ```ucm -.> move Foo Bar -.> ls -.> ls Bar -.> history Bar +scratch/main> move Foo Bar +scratch/main> ls +scratch/main> ls Bar +scratch/main> history Bar ``` ## Happy Path - Just term @@ -44,10 +44,10 @@ bonk = 5 ``` ```ucm -.z> builtins.merge -.z> add -.z> move bonk zonk -.z> ls +z/main> builtins.merge +z/main> add +z/main> move bonk zonk +z/main> ls ``` ## Happy Path - Just namespace @@ -57,15 +57,15 @@ bonk.zonk = 5 ``` ```ucm -.a> builtins.merge -.a> add -.a> move bonk zonk -.a> ls -.a> view zonk.zonk +a/main> builtins.merge +a/main> add +a/main> move bonk zonk +a/main> ls +a/main> view zonk.zonk ``` ## Sad Path - No term, type, or namespace named src ```ucm:error -.> move doesntexist foo +scratch/main> move doesntexist foo ``` diff --git a/unison-src/transcripts/move-all.output.md b/unison-src/transcripts/move-all.output.md index f5fefba06..d7a7bec85 100644 --- a/unison-src/transcripts/move-all.output.md +++ b/unison-src/transcripts/move-all.output.md @@ -28,7 +28,7 @@ unique type Foo.T = T ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -60,7 +60,7 @@ unique type Foo.T = T1 | T2 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -71,25 +71,25 @@ unique type Foo.T = T1 | T2 Should be able to move the term, type, and namespace, including its types, terms, and sub-namespaces. ```ucm -.> move Foo Bar +scratch/main> move Foo Bar Done. -.> ls +scratch/main> ls 1. Bar (Nat) 2. Bar (type) 3. Bar/ (4 terms, 1 type) 4. builtin/ (469 terms, 74 types) -.> ls Bar +scratch/main> ls Bar 1. Foo (Bar) 2. T (type) 3. T/ (2 terms) 4. termInA (Nat) -.> history Bar +scratch/main> history Bar Note: The most recent namespace hash is immediately below this message. @@ -127,23 +127,21 @@ bonk = 5 ``` ```ucm - ☝️ The namespace .z is empty. - -.z> builtins.merge +z/main> builtins.merge Done. -.z> add +z/main> add ⍟ I've added these definitions: bonk : Nat -.z> move bonk zonk +z/main> move bonk zonk Done. -.z> ls +z/main> ls 1. builtin/ (469 terms, 74 types) 2. zonk (Nat) @@ -170,28 +168,26 @@ bonk.zonk = 5 ``` ```ucm - ☝️ The namespace .a is empty. - -.a> builtins.merge +a/main> builtins.merge Done. -.a> add +a/main> add ⍟ I've added these definitions: bonk.zonk : Nat -.a> move bonk zonk +a/main> move bonk zonk Done. -.a> ls +a/main> ls 1. builtin/ (469 terms, 74 types) 2. zonk/ (1 term) -.a> view zonk.zonk +a/main> view zonk.zonk zonk.zonk : Nat zonk.zonk = 5 @@ -200,7 +196,7 @@ bonk.zonk = 5 ## Sad Path - No term, type, or namespace named src ```ucm -.> move doesntexist foo +scratch/main> move doesntexist foo ⚠️ diff --git a/unison-src/transcripts/move-namespace.md b/unison-src/transcripts/move-namespace.md index 15c66f74c..0d1c7ba3e 100644 --- a/unison-src/transcripts/move-namespace.md +++ b/unison-src/transcripts/move-namespace.md @@ -1,107 +1,16 @@ # Tests for `move.namespace` -```ucm:hide -.happy> builtins.merge -.history> builtins.merge -.existing> builtins.merge -``` -## Happy path - -Create a namespace and add some history to it - -```unison -a.termInA = 1 -unique type a.T = T -``` - -```ucm -.happy> add -``` - -```unison -a.termInA = 2 -unique type a.T = T1 | T2 -``` - -```ucm -.happy> update -``` - -Should be able to move the namespace, including its types, terms, and sub-namespaces. - -```ucm -.happy> move.namespace a b -.happy> ls b -.happy> history b -``` - - -## Namespace history - - -Create some namespaces and add some history to them - -```unison -a.termInA = 1 -b.termInB = 10 -``` - -```ucm -.history> add -``` - -```unison -a.termInA = 2 -b.termInB = 11 -``` - -```ucm -.history> update -``` - -Deleting a namespace should not leave behind any history, -if we move another to that location we expect the history to simply be the history -of the moved namespace. - -```ucm -.history> delete.namespace b -.history> move.namespace a b --- Should be the history from 'a' -.history> history b --- Should be empty -.history> history a -``` - - -## Moving over an existing branch - -Create some namespace and add some history to them - -```unison -a.termInA = 1 -b.termInB = 10 -``` - -```ucm -.existing> add -``` - -```unison -a.termInA = 2 -b.termInB = 11 -``` - -```ucm -.existing> update -.existing> move.namespace a b -``` - -## Moving the Root +## Moving the Root I should be able to move the root into a sub-namespace +```unison:hide +foo = 1 +``` + ```ucm +.> add -- Should request confirmation .> move.namespace . .root.at.path .> move.namespace . .root.at.path @@ -118,8 +27,8 @@ I should be able to move a sub namespace _over_ the root. ```ucm -- Should request confirmation -.> move.namespace .root.at.path.happy . -.> move.namespace .root.at.path.happy . +.> move.namespace .root.at.path . +.> move.namespace .root.at.path . .> ls .> history ``` @@ -127,6 +36,109 @@ I should be able to move a sub namespace _over_ the root. ```ucm:error -- should be empty -.> ls .root.at.path.happy -.> history .root.at.path.happy +.> ls .root.at.path +.> history .root.at.path ``` + +```ucm:hide +scratch/happy> builtins.merge lib.builtins +``` + +## Happy path + +Create a namespace and add some history to it + +```unison +a.termInA = 1 +unique type a.T = T +``` + +```ucm +scratch/happy> add +``` + +```unison +a.termInA = 2 +unique type a.T = T1 | T2 +``` + +```ucm +scratch/happy> update +``` + +Should be able to move the namespace, including its types, terms, and sub-namespaces. + +```ucm +scratch/happy> move.namespace a b +scratch/happy> ls b +scratch/happy> history b +``` + + +## Namespace history + +```ucm:hide +scratch/history> builtins.merge lib.builtins +``` + +Create some namespaces and add some history to them + +```unison +a.termInA = 1 +b.termInB = 10 +``` + +```ucm +scratch/history> add +``` + +```unison +a.termInA = 2 +b.termInB = 11 +``` + +```ucm +scratch/history> update +``` + +Deleting a namespace should not leave behind any history, +if we move another to that location we expect the history to simply be the history +of the moved namespace. + +```ucm +scratch/history> delete.namespace b +scratch/history> move.namespace a b +-- Should be the history from 'a' +scratch/history> history b +-- Should be empty +scratch/history> history a +``` + + +## Moving over an existing branch + +```ucm:hide +scratch/existing> builtins.merge lib.builtins +``` + +Create some namespace and add some history to them + +```unison +a.termInA = 1 +b.termInB = 10 +``` + +```ucm +scratch/existing> add +``` + +```unison +a.termInA = 2 +b.termInB = 11 +``` + +```ucm +scratch/existing> update +scratch/existing> move.namespace a b +``` + diff --git a/unison-src/transcripts/move-namespace.output.md b/unison-src/transcripts/move-namespace.output.md index 9b63baeb6..257365dbd 100644 --- a/unison-src/transcripts/move-namespace.output.md +++ b/unison-src/transcripts/move-namespace.output.md @@ -1,5 +1,102 @@ # Tests for `move.namespace` + +## Moving the Root + +I should be able to move the root into a sub-namespace + +```unison +foo = 1 +``` + +```ucm +.> add + + ⍟ I've added these definitions: + + foo : ##Nat + +-- Should request confirmation +.> move.namespace . .root.at.path + + ⚠️ + + Moves which affect the root branch cannot be undone, are you sure? + Re-run the same command to proceed. + +.> move.namespace . .root.at.path + + Done. + +.> ls + + 1. root/ (1 term) + +.> history + + Note: The most recent namespace hash is immediately below this + message. + + + + □ 1. #g97lh1m2v7 (start of history) + +``` +```ucm +.> ls .root.at.path + + 1. foo (##Nat) + +.> history .root.at.path + + Note: The most recent namespace hash is immediately below this + message. + + + + □ 1. #08a6hgi6s4 (start of history) + +``` +I should be able to move a sub namespace _over_ the root. + +```ucm +-- Should request confirmation +.> move.namespace .root.at.path . + + ⚠️ + + Moves which affect the root branch cannot be undone, are you sure? + Re-run the same command to proceed. + +.> move.namespace .root.at.path . + + Done. + +.> ls + + 1. foo (##Nat) + +.> history + + Note: The most recent namespace hash is immediately below this + message. + + + + □ 1. #08a6hgi6s4 (start of history) + +``` +```ucm +-- should be empty +.> ls .root.at.path + + nothing to show + +.> history .root.at.path + + ☝️ The namespace .root.at.path is empty. + +``` ## Happy path Create a namespace and add some history to it @@ -24,7 +121,7 @@ unique type a.T = T ``` ```ucm -.happy> add +scratch/happy> add ⍟ I've added these definitions: @@ -53,7 +150,7 @@ unique type a.T = T1 | T2 ``` ```ucm -.happy> update +scratch/happy> update Okay, I'm searching the branch for code that needs to be updated... @@ -64,22 +161,22 @@ unique type a.T = T1 | T2 Should be able to move the namespace, including its types, terms, and sub-namespaces. ```ucm -.happy> move.namespace a b +scratch/happy> move.namespace a b Done. -.happy> ls b +scratch/happy> ls b 1. T (type) 2. T/ (2 terms) 3. termInA (Nat) -.happy> history b +scratch/happy> history b Note: The most recent namespace hash is immediately below this message. - ⊙ 1. #4j747vnmdk + ⊙ 1. #rkvfe5p8fu + Adds / updates: @@ -89,12 +186,11 @@ Should be able to move the namespace, including its types, terms, and sub-namesp T.T - □ 2. #r71j4144fe (start of history) + □ 2. #avlnmh0erc (start of history) ``` ## Namespace history - Create some namespaces and add some history to them ```unison @@ -117,7 +213,7 @@ b.termInB = 10 ``` ```ucm -.history> add +scratch/history> add ⍟ I've added these definitions: @@ -146,7 +242,7 @@ b.termInB = 11 ``` ```ucm -.history> update +scratch/history> update Okay, I'm searching the branch for code that needs to be updated... @@ -156,19 +252,19 @@ b.termInB = 11 ``` Deleting a namespace should not leave behind any history, if we move another to that location we expect the history to simply be the history -of the moved namespace. +of the moved namespace. ```ucm -.history> delete.namespace b +scratch/history> delete.namespace b Done. -.history> move.namespace a b +scratch/history> move.namespace a b Done. -- Should be the history from 'a' -.history> history b +scratch/history> history b Note: The most recent namespace hash is immediately below this message. @@ -182,12 +278,12 @@ of the moved namespace. □ 2. #m8smmmgjso (start of history) -- Should be empty -.history> history a +scratch/history> history a - ☝️ The namespace .history.a is empty. + ☝️ The namespace a is empty. ``` -## Moving over an existing branch +## Moving over an existing branch Create some namespace and add some history to them @@ -211,7 +307,7 @@ b.termInB = 10 ``` ```ucm -.existing> add +scratch/existing> add ⍟ I've added these definitions: @@ -240,14 +336,14 @@ b.termInB = 11 ``` ```ucm -.existing> update +scratch/existing> update Okay, I'm searching the branch for code that needs to be updated... Done. -.existing> move.namespace a b +scratch/existing> move.namespace a b ⚠️ @@ -258,208 +354,3 @@ b.termInB = 11 Done. ``` -## Moving the Root - -I should be able to move the root into a sub-namespace - -```ucm --- Should request confirmation -.> move.namespace . .root.at.path - - ⚠️ - - Moves which affect the root branch cannot be undone, are you sure? - Re-run the same command to proceed. - -.> move.namespace . .root.at.path - - Done. - -.> ls - - 1. root/ (1412 terms, 223 types) - -.> history - - Note: The most recent namespace hash is immediately below this - message. - - - - □ 1. #o7cku9c0t9 (start of history) - -``` -```ucm -.> ls .root.at.path - - 1. existing/ (470 terms, 74 types) - 2. happy/ (472 terms, 75 types) - 3. history/ (470 terms, 74 types) - -.> history .root.at.path - - Note: The most recent namespace hash is immediately below this - message. - - ⊙ 1. #fv72cqfto4 - - - Deletes: - - existing.b.termInB - - > Moves: - - Original name New name - existing.a.termInA existing.b.termInA - - ⊙ 2. #12iqsb3l9g - - + Adds / updates: - - existing.a.termInA existing.b.termInB - - = Copies: - - Original name New name(s) - happy.b.termInA existing.a.termInA - history.b.termInA existing.a.termInA - - ⊙ 3. #r9jmgtco5u - - + Adds / updates: - - existing.a.termInA existing.b.termInB - - ⊙ 4. #1k6kae1vn4 - - > Moves: - - Original name New name - history.a.termInA history.b.termInA - - ⊙ 5. #ua9re7leg7 - - - Deletes: - - history.b.termInB - - ⊙ 6. #3k8ouql6cc - - + Adds / updates: - - history.a.termInA history.b.termInB - - = Copies: - - Original name New name(s) - happy.b.termInA history.a.termInA - - ⊙ 7. #fp2331i1ek - - + Adds / updates: - - history.a.termInA history.b.termInB - - ⊙ 8. #5sj5jefgcu - - > Moves: - - Original name New name - happy.a.T happy.b.T - happy.a.T.T1 happy.b.T.T1 - happy.a.T.T2 happy.b.T.T2 - happy.a.termInA happy.b.termInA - - ⊙ 9. #ell48pttus - - + Adds / updates: - - happy.a.T happy.a.T.T1 happy.a.T.T2 happy.a.termInA - - - Deletes: - - happy.a.T.T - - ⊙ 10. #al8eguoh70 - - + Adds / updates: - - happy.a.T happy.a.T.T happy.a.termInA - - There's more history before the versions shown here. Use - `history #som3n4m3space` to view history starting from a given - namespace hash. - - ⠇ - - ⊙ 11. #okceqk39nf - - -``` -I should be able to move a sub namespace _over_ the root. - -```ucm --- Should request confirmation -.> move.namespace .root.at.path.happy . - - ⚠️ - - Moves which affect the root branch cannot be undone, are you sure? - Re-run the same command to proceed. - -.> move.namespace .root.at.path.happy . - - Done. - -.> ls - - 1. b/ (3 terms, 1 type) - 2. builtin/ (469 terms, 74 types) - -.> history - - Note: The most recent namespace hash is immediately below this - message. - - ⊙ 1. #0rvi5q5une - - + Adds / updates: - - b.T b.T.T1 b.T.T2 b.termInA - - ⊙ 2. #oaa8ltdusf - - - Deletes: - - a.T a.T.T1 a.T.T2 a.termInA - - ⊙ 3. #t1c91ou7ri - - + Adds / updates: - - a.T a.T.T1 a.T.T2 a.termInA - - - Deletes: - - a.T.T - - ⊙ 4. #hovh08jep4 - - + Adds / updates: - - a.T a.T.T a.termInA - - □ 5. #4bigcpnl7t (start of history) - -``` -```ucm --- should be empty -.> ls .root.at.path.happy - - nothing to show - -.> history .root.at.path.happy - - ☝️ The namespace .root.at.path.happy is empty. - -``` diff --git a/unison-src/transcripts/name-segment-escape.md b/unison-src/transcripts/name-segment-escape.md index a78295318..bf6bca128 100644 --- a/unison-src/transcripts/name-segment-escape.md +++ b/unison-src/transcripts/name-segment-escape.md @@ -1,8 +1,8 @@ You can use a keyword or reserved operator as a name segment if you surround it with backticks. ```ucm:error -.> view `match` -.> view `=` +scratch/main> view `match` +scratch/main> view `=` ``` You can also use backticks to expand the set of valid symbols in a symboly name segment to include these three: `.()` @@ -10,6 +10,6 @@ You can also use backticks to expand the set of valid symbols in a symboly name This allows you to spell `.` or `()` as name segments (which historically have appeared in the namespace). ```ucm:error -.> view `.` -.> view `()` +scratch/main> view `.` +scratch/main> view `()` ``` diff --git a/unison-src/transcripts/name-segment-escape.output.md b/unison-src/transcripts/name-segment-escape.output.md index 7eef02077..f324018ff 100644 --- a/unison-src/transcripts/name-segment-escape.output.md +++ b/unison-src/transcripts/name-segment-escape.output.md @@ -1,14 +1,14 @@ You can use a keyword or reserved operator as a name segment if you surround it with backticks. ```ucm -.> view `match` +scratch/main> view `match` ⚠️ The following names were not found in the codebase. Check your spelling. `match` -.> view `=` +scratch/main> view `=` ⚠️ @@ -21,14 +21,14 @@ You can also use backticks to expand the set of valid symbols in a symboly name This allows you to spell `.` or `()` as name segments (which historically have appeared in the namespace). ```ucm -.> view `.` +scratch/main> view `.` ⚠️ The following names were not found in the codebase. Check your spelling. `.` -.> view `()` +scratch/main> view `()` ⚠️ diff --git a/unison-src/transcripts/namespace-deletion-regression.md b/unison-src/transcripts/namespace-deletion-regression.md index d33a70710..a1bc14ca3 100644 --- a/unison-src/transcripts/namespace-deletion-regression.md +++ b/unison-src/transcripts/namespace-deletion-regression.md @@ -8,9 +8,9 @@ Previously the following sequence delete the current namespace unexpectedly 😬. ```ucm -.> alias.term ##Nat.+ .Nat.+ -.> ls Nat -.> move.namespace Nat Nat.operators -.> ls Nat -.> ls Nat.operators +scratch/main> alias.term ##Nat.+ Nat.+ +scratch/main> ls Nat +scratch/main> move.namespace Nat Nat.operators +scratch/main> ls Nat +scratch/main> ls Nat.operators ``` diff --git a/unison-src/transcripts/namespace-deletion-regression.output.md b/unison-src/transcripts/namespace-deletion-regression.output.md index 45af1bfcb..21e0866f7 100644 --- a/unison-src/transcripts/namespace-deletion-regression.output.md +++ b/unison-src/transcripts/namespace-deletion-regression.output.md @@ -8,23 +8,23 @@ Previously the following sequence delete the current namespace unexpectedly 😬. ```ucm -.> alias.term ##Nat.+ .Nat.+ +scratch/main> alias.term ##Nat.+ Nat.+ Done. -.> ls Nat +scratch/main> ls Nat 1. + (##Nat -> ##Nat -> ##Nat) -.> move.namespace Nat Nat.operators +scratch/main> move.namespace Nat Nat.operators Done. -.> ls Nat +scratch/main> ls Nat 1. operators/ (1 term) -.> ls Nat.operators +scratch/main> ls Nat.operators 1. + (##Nat -> ##Nat -> ##Nat) diff --git a/unison-src/transcripts-using-base/namespace-dependencies.md b/unison-src/transcripts/namespace-dependencies.md similarity index 65% rename from unison-src/transcripts-using-base/namespace-dependencies.md rename to unison-src/transcripts/namespace-dependencies.md index d338c0543..0e8223a6c 100644 --- a/unison-src/transcripts-using-base/namespace-dependencies.md +++ b/unison-src/transcripts/namespace-dependencies.md @@ -1,8 +1,9 @@ # namespace.dependencies command ```unison:hide +const a b = a external.mynat = 1 -mynamespace.dependsOnText = external.mynat Nat.+ 10 +mynamespace.dependsOnText = const external.mynat 10 ``` ```ucm diff --git a/unison-src/transcripts-using-base/namespace-dependencies.output.md b/unison-src/transcripts/namespace-dependencies.output.md similarity index 53% rename from unison-src/transcripts-using-base/namespace-dependencies.output.md rename to unison-src/transcripts/namespace-dependencies.output.md index caf4dc52c..0e7d29826 100644 --- a/unison-src/transcripts-using-base/namespace-dependencies.output.md +++ b/unison-src/transcripts/namespace-dependencies.output.md @@ -1,8 +1,9 @@ # namespace.dependencies command ```unison +const a b = a external.mynat = 1 -mynamespace.dependsOnText = external.mynat Nat.+ 10 +mynamespace.dependsOnText = const external.mynat 10 ``` ```ucm @@ -10,15 +11,16 @@ mynamespace.dependsOnText = external.mynat Nat.+ 10 ⍟ I've added these definitions: - external.mynat : Nat - mynamespace.dependsOnText : Nat + const : a -> b -> a + external.mynat : ##Nat + mynamespace.dependsOnText : ##Nat .mynamespace> namespace.dependencies External dependency Dependents in .mynamespace - .builtin.Nat 1. dependsOnText + ##Nat 1. dependsOnText - .builtin.Nat.+ 1. dependsOnText + .const 1. dependsOnText .external.mynat 1. dependsOnText diff --git a/unison-src/transcripts/numbered-args.md b/unison-src/transcripts/numbered-args.md index f421a6717..02172710b 100644 --- a/unison-src/transcripts/numbered-args.md +++ b/unison-src/transcripts/numbered-args.md @@ -1,7 +1,7 @@ # Using numbered arguments in UCM ```ucm:hide -.temp> alias.type ##Text Text +scratch/main> alias.type ##Text Text ``` First lets add some contents to our codebase. @@ -16,41 +16,41 @@ corge = "corge" ``` ```ucm -.temp> add +scratch/main> add ``` We can get the list of things in the namespace, and UCM will give us a numbered list: ```ucm -.temp> find +scratch/main> find ``` We can ask to `view` the second element of this list: ```ucm -.temp> find -.temp> view 2 +scratch/main> find +scratch/main> view 2 ``` And we can `view` multiple elements by separating with spaces: ```ucm -.temp> find -.temp> view 2 3 5 +scratch/main> find +scratch/main> view 2 3 5 ``` We can also ask for a range: ```ucm -.temp> find -.temp> view 2-4 +scratch/main> find +scratch/main> view 2-4 ``` And we can ask for multiple ranges and use mix of ranges and numbers: ```ucm -.temp> find -.temp> view 1-3 4 5-6 +scratch/main> find +scratch/main> view 1-3 4 5-6 ``` diff --git a/unison-src/transcripts/numbered-args.output.md b/unison-src/transcripts/numbered-args.output.md index b8dfce49f..883a319de 100644 --- a/unison-src/transcripts/numbered-args.output.md +++ b/unison-src/transcripts/numbered-args.output.md @@ -30,7 +30,7 @@ corge = "corge" ``` ```ucm -.temp> add +scratch/main> add ⍟ I've added these definitions: @@ -46,7 +46,7 @@ We can get the list of things in the namespace, and UCM will give us a numbered list: ```ucm -.temp> find +scratch/main> find 1. bar : Text 2. baz : Text @@ -61,7 +61,7 @@ list: We can ask to `view` the second element of this list: ```ucm -.temp> find +scratch/main> find 1. bar : Text 2. baz : Text @@ -72,7 +72,7 @@ We can ask to `view` the second element of this list: 7. builtin type Text -.temp> view 2 +scratch/main> view 2 baz : Text baz = "baz" @@ -81,7 +81,7 @@ We can ask to `view` the second element of this list: And we can `view` multiple elements by separating with spaces: ```ucm -.temp> find +scratch/main> find 1. bar : Text 2. baz : Text @@ -92,7 +92,7 @@ And we can `view` multiple elements by separating with spaces: 7. builtin type Text -.temp> view 2 3 5 +scratch/main> view 2 3 5 baz : Text baz = "baz" @@ -107,7 +107,7 @@ And we can `view` multiple elements by separating with spaces: We can also ask for a range: ```ucm -.temp> find +scratch/main> find 1. bar : Text 2. baz : Text @@ -118,7 +118,7 @@ We can also ask for a range: 7. builtin type Text -.temp> view 2-4 +scratch/main> view 2-4 baz : Text baz = "baz" @@ -133,7 +133,7 @@ We can also ask for a range: And we can ask for multiple ranges and use mix of ranges and numbers: ```ucm -.temp> find +scratch/main> find 1. bar : Text 2. baz : Text @@ -144,7 +144,7 @@ And we can ask for multiple ranges and use mix of ranges and numbers: 7. builtin type Text -.temp> view 1-3 4 5-6 +scratch/main> view 1-3 4 5-6 bar : Text bar = "bar" diff --git a/unison-src/transcripts/old-fold-right.md b/unison-src/transcripts/old-fold-right.md index f3c01d5d0..179ad5b93 100644 --- a/unison-src/transcripts/old-fold-right.md +++ b/unison-src/transcripts/old-fold-right.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/pattern-match-coverage.md b/unison-src/transcripts/pattern-match-coverage.md index 8c35e07d5..e08ea269a 100644 --- a/unison-src/transcripts/pattern-match-coverage.md +++ b/unison-src/transcripts/pattern-match-coverage.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` # Basics @@ -292,7 +292,7 @@ unit2t = cases ``` ```ucm -.> add +scratch/main> add ``` Pattern coverage checking needs the data decl map to contain all @@ -316,7 +316,7 @@ evil = bug "" ``` ```ucm -.> add +scratch/main> add ``` ```unison:error @@ -330,7 +330,7 @@ unique type SomeType = A ``` ```ucm -.> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts/pattern-match-coverage.output.md b/unison-src/transcripts/pattern-match-coverage.output.md index 0a0b290c9..b8d30cb25 100644 --- a/unison-src/transcripts/pattern-match-coverage.output.md +++ b/unison-src/transcripts/pattern-match-coverage.output.md @@ -650,7 +650,7 @@ unit2t = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -706,7 +706,7 @@ evil = bug "" ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -747,7 +747,7 @@ unique type SomeType = A ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/pattern-pretty-print-2345.md b/unison-src/transcripts/pattern-pretty-print-2345.md index 0879808f2..8728aa4d8 100644 --- a/unison-src/transcripts/pattern-pretty-print-2345.md +++ b/unison-src/transcripts/pattern-pretty-print-2345.md @@ -2,7 +2,7 @@ Regression test for https://github.com/unisonweb/unison/pull/2377 ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -65,21 +65,21 @@ doc = cases ``` ```ucm -.> add -.> view dopey -.> view grumpy -.> view happy -.> view sneezy -.> view bashful -.> view mouthy -.> view pokey -.> view sleepy -.> view demure -.> view angry -.> view tremulous -.> view throaty -.> view agitated -.> view doc +scratch/main> add +scratch/main> view dopey +scratch/main> view grumpy +scratch/main> view happy +scratch/main> view sneezy +scratch/main> view bashful +scratch/main> view mouthy +scratch/main> view pokey +scratch/main> view sleepy +scratch/main> view demure +scratch/main> view angry +scratch/main> view tremulous +scratch/main> view throaty +scratch/main> view agitated +scratch/main> view doc ``` diff --git a/unison-src/transcripts/pattern-pretty-print-2345.output.md b/unison-src/transcripts/pattern-pretty-print-2345.output.md index 6c239772d..6157aa8e7 100644 --- a/unison-src/transcripts/pattern-pretty-print-2345.output.md +++ b/unison-src/transcripts/pattern-pretty-print-2345.output.md @@ -88,7 +88,7 @@ doc = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -108,94 +108,94 @@ doc = cases throaty : Request {g, Ab} x -> () tremulous : (Nat, Nat) -> () -.> view dopey +scratch/main> view dopey dopey : Char -> () dopey = cases ?0 -> () _ -> () -.> view grumpy +scratch/main> view grumpy grumpy : ff284oqf651 -> () grumpy = cases d -> () -.> view happy +scratch/main> view happy happy : Boolean -> () happy = cases true -> () false -> () -.> view sneezy +scratch/main> view sneezy sneezy : Int -> () sneezy = cases +1 -> () _ -> () -.> view bashful +scratch/main> view bashful bashful : Optional a -> () bashful = cases Some a -> () _ -> () -.> view mouthy +scratch/main> view mouthy mouthy : [t] -> () mouthy = cases [] -> () _ -> () -.> view pokey +scratch/main> view pokey pokey : [t] -> () pokey = cases h +: t -> () _ -> () -.> view sleepy +scratch/main> view sleepy sleepy : [t] -> () sleepy = cases i :+ l -> () _ -> () -.> view demure +scratch/main> view demure demure : [Nat] -> () demure = cases [0] -> () _ -> () -.> view angry +scratch/main> view angry angry : [t] -> () angry = cases a ++ [] -> () -.> view tremulous +scratch/main> view tremulous tremulous : (Nat, Nat) -> () tremulous = cases (0, 1) -> () _ -> () -.> view throaty +scratch/main> view throaty throaty : Request {g, Ab} x -> () throaty = cases { Ab.a a -> k } -> () { _ } -> () -.> view agitated +scratch/main> view agitated agitated : Nat -> () agitated = cases a | a == 2 -> () _ -> () -.> view doc +scratch/main> view doc doc : Nat -> () doc = cases diff --git a/unison-src/transcripts/patternMatchTls.md b/unison-src/transcripts/patternMatchTls.md index cfe5b177c..dbd851071 100644 --- a/unison-src/transcripts/patternMatchTls.md +++ b/unison-src/transcripts/patternMatchTls.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` We had bugs in the calling conventions for both send and terminate which would @@ -29,6 +29,6 @@ assertRight = cases ```ucm -.> add -.> run frank +scratch/main> add +scratch/main> run frank ``` diff --git a/unison-src/transcripts/patternMatchTls.output.md b/unison-src/transcripts/patternMatchTls.output.md index b1f82833b..65aa5153d 100644 --- a/unison-src/transcripts/patternMatchTls.output.md +++ b/unison-src/transcripts/patternMatchTls.output.md @@ -37,14 +37,14 @@ assertRight = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: assertRight : Either a b -> b frank : '{IO} () -.> run frank +scratch/main> run frank () diff --git a/unison-src/transcripts/patterns.md b/unison-src/transcripts/patterns.md index 104d1bc8a..8eb309ad7 100644 --- a/unison-src/transcripts/patterns.md +++ b/unison-src/transcripts/patterns.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Some tests of pattern behavior. diff --git a/unison-src/transcripts/propagate.md b/unison-src/transcripts/propagate.md index cc80ef885..b5eaf3ede 100644 --- a/unison-src/transcripts/propagate.md +++ b/unison-src/transcripts/propagate.md @@ -1,7 +1,7 @@ # Propagating type edits ```ucm:hide -.subpath.lib> builtins.merge +scratch/main> builtins.merge lib.builtins ``` We introduce a type `Foo` with a function dependent `fooToInt`. @@ -16,9 +16,9 @@ fooToInt _ = +42 And then we add it. ```ucm -.subpath> add -.subpath> find.verbose -.subpath> view fooToInt +scratch/main> add +scratch/main> find.verbose +scratch/main> view fooToInt ``` Then if we change the type `Foo`... @@ -30,13 +30,13 @@ unique type Foo = Foo | Bar and update the codebase to use the new type `Foo`... ```ucm -.subpath> update.old +scratch/main> update.old ``` ... it should automatically propagate the type to `fooToInt`. ```ucm -.subpath> view fooToInt +scratch/main> view fooToInt ``` ### Preserving user type variables @@ -55,7 +55,7 @@ preserve.otherTerm y = someTerm y Add that to the codebase: ```ucm -.subpath> add +scratch/main> add ``` Let's now edit the dependency: @@ -68,15 +68,15 @@ preserve.someTerm _ = None Update... ```ucm -.subpath> update.old +scratch/main> update.old ``` Now the type of `someTerm` should be `Optional x -> Optional x` and the type of `otherTerm` should remain the same. ```ucm -.subpath> view preserve.someTerm -.subpath> view preserve.otherTerm +scratch/main> view preserve.someTerm +scratch/main> view preserve.otherTerm ``` ### Propagation only applies to the local branch @@ -84,7 +84,6 @@ type of `otherTerm` should remain the same. Cleaning up a bit... ```ucm -.> delete.namespace subpath .subpath.lib> builtins.merge ``` diff --git a/unison-src/transcripts/propagate.output.md b/unison-src/transcripts/propagate.output.md index 5f0b72bb3..5e16983bc 100644 --- a/unison-src/transcripts/propagate.output.md +++ b/unison-src/transcripts/propagate.output.md @@ -26,14 +26,14 @@ fooToInt _ = +42 And then we add it. ```ucm -.subpath> add +scratch/main> add ⍟ I've added these definitions: type Foo fooToInt : Foo -> Int -.subpath> find.verbose +scratch/main> find.verbose 1. -- #uj8oalgadr2f52qloufah6t8vsvbc76oqijkotek87vooih7aqu44k20hrs34kartusapghp4jmfv6g1409peklv3r6a527qpk52soo type Foo @@ -46,7 +46,7 @@ And then we add it. -.subpath> view fooToInt +scratch/main> view fooToInt fooToInt : Foo -> Int fooToInt _ = +42 @@ -75,7 +75,7 @@ unique type Foo = Foo | Bar and update the codebase to use the new type `Foo`... ```ucm -.subpath> update.old +scratch/main> update.old ⍟ I've updated these names to your new definition: @@ -85,7 +85,7 @@ and update the codebase to use the new type `Foo`... ... it should automatically propagate the type to `fooToInt`. ```ucm -.subpath> view fooToInt +scratch/main> view fooToInt fooToInt : Foo -> Int fooToInt _ = +42 @@ -121,7 +121,7 @@ preserve.otherTerm y = someTerm y Add that to the codebase: ```ucm -.subpath> add +scratch/main> add ⍟ I've added these definitions: @@ -153,7 +153,7 @@ preserve.someTerm _ = None Update... ```ucm -.subpath> update.old +scratch/main> update.old ⍟ I've updated these names to your new definition: @@ -164,12 +164,12 @@ Now the type of `someTerm` should be `Optional x -> Optional x` and the type of `otherTerm` should remain the same. ```ucm -.subpath> view preserve.someTerm +scratch/main> view preserve.someTerm preserve.someTerm : Optional x -> Optional x preserve.someTerm _ = None -.subpath> view preserve.otherTerm +scratch/main> view preserve.otherTerm preserve.otherTerm : Optional baz -> Optional baz preserve.otherTerm y = someTerm y @@ -180,10 +180,6 @@ type of `otherTerm` should remain the same. Cleaning up a bit... ```ucm -.> delete.namespace subpath - - Done. - ☝️ The namespace .subpath.lib is empty. .subpath.lib> builtins.merge diff --git a/unison-src/transcripts/records.md b/unison-src/transcripts/records.md index 4a3d5d23d..199218f3e 100644 --- a/unison-src/transcripts/records.md +++ b/unison-src/transcripts/records.md @@ -1,8 +1,8 @@ Ensure that Records keep their syntax after being added to the codebase ```ucm:hide -.> builtins.merge -.> load unison-src/transcripts-using-base/base.u +scratch/main> builtins.merge +scratch/main> load unison-src/transcripts-using-base/base.u ``` ## Record with 1 field @@ -12,11 +12,11 @@ unique type Record1 = { a : Text } ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view Record1 +scratch/main> view Record1 ``` ## Record with 2 fields @@ -26,11 +26,11 @@ unique type Record2 = { a : Text, b : Int } ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view Record2 +scratch/main> view Record2 ``` ## Record with 3 fields @@ -40,11 +40,11 @@ unique type Record3 = { a : Text, b : Int, c : Nat } ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view Record3 +scratch/main> view Record3 ``` ## Record with many fields @@ -62,11 +62,11 @@ unique type Record4 = ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view Record4 +scratch/main> view Record4 ``` ## Record with many many fields @@ -98,11 +98,11 @@ unique type Record5 = { ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> view Record5 +scratch/main> view Record5 ``` ## Record with user-defined type fields @@ -116,13 +116,13 @@ unique type RecordWithUserType = { a : Text, b : Record4, c : UserType } ``` ```ucm:hide -.> add +scratch/main> add ``` If you `view` or `edit` it, it _should_ be treated as a record type, but it does not (which is a bug) ```ucm -.> view RecordWithUserType +scratch/main> view RecordWithUserType ``` diff --git a/unison-src/transcripts/records.output.md b/unison-src/transcripts/records.output.md index 064e18c69..315bec4bb 100644 --- a/unison-src/transcripts/records.output.md +++ b/unison-src/transcripts/records.output.md @@ -7,7 +7,7 @@ unique type Record1 = { a : Text } ``` ```ucm -.> view Record1 +scratch/main> view Record1 type Record1 = { a : Text } @@ -19,7 +19,7 @@ unique type Record2 = { a : Text, b : Int } ``` ```ucm -.> view Record2 +scratch/main> view Record2 type Record2 = { a : Text, b : Int } @@ -31,7 +31,7 @@ unique type Record3 = { a : Text, b : Int, c : Nat } ``` ```ucm -.> view Record3 +scratch/main> view Record3 type Record3 = { a : Text, b : Int, c : Nat } @@ -51,7 +51,7 @@ unique type Record4 = ``` ```ucm -.> view Record4 +scratch/main> view Record4 type Record4 = { a : Text, @@ -92,7 +92,7 @@ unique type Record5 = { ``` ```ucm -.> view Record5 +scratch/main> view Record5 type Record5 = { zero : Nat, @@ -131,7 +131,7 @@ unique type RecordWithUserType = { a : Text, b : Record4, c : UserType } If you `view` or `edit` it, it _should_ be treated as a record type, but it does not (which is a bug) ```ucm -.> view RecordWithUserType +scratch/main> view RecordWithUserType type RecordWithUserType = { a : Text, b : Record4, c : UserType } diff --git a/unison-src/transcripts/reset.md b/unison-src/transcripts/reset.md index a01351233..f8d18e782 100644 --- a/unison-src/transcripts/reset.md +++ b/unison-src/transcripts/reset.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` # reset loose code @@ -8,10 +8,10 @@ a = 5 ``` ```ucm -.> add -.> history -.> reset 2 -.> history +scratch/main> add +scratch/main> history +scratch/main> reset 2 +scratch/main> history ``` ```unison @@ -19,11 +19,11 @@ foo.a = 5 ``` ```ucm -.> add -.> ls foo -.> history -.> reset 1 foo -.> ls foo.foo +scratch/main> add +scratch/main> ls foo +scratch/main> history +scratch/main> reset 1 foo +scratch/main> ls foo.foo ``` # reset branch diff --git a/unison-src/transcripts/reset.output.md b/unison-src/transcripts/reset.output.md index 344b2c16f..9be437365 100644 --- a/unison-src/transcripts/reset.output.md +++ b/unison-src/transcripts/reset.output.md @@ -17,13 +17,13 @@ a = 5 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: a : Nat -.> history +scratch/main> history Note: The most recent namespace hash is immediately below this message. @@ -36,11 +36,11 @@ a = 5 □ 2. #4bigcpnl7t (start of history) -.> reset 2 +scratch/main> reset 2 Done. -.> history +scratch/main> history Note: The most recent namespace hash is immediately below this message. @@ -68,17 +68,17 @@ foo.a = 5 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: foo.a : Nat -.> ls foo +scratch/main> ls foo 1. a (Nat) -.> history +scratch/main> history Note: The most recent namespace hash is immediately below this message. @@ -91,11 +91,11 @@ foo.a = 5 □ 2. #4bigcpnl7t (start of history) -.> reset 1 foo +scratch/main> reset 1 foo Done. -.> ls foo.foo +scratch/main> ls foo.foo 1. a (Nat) diff --git a/unison-src/transcripts/rsa.md b/unison-src/transcripts/rsa.md index 6b9ed33b5..6fe211837 100644 --- a/unison-src/transcripts/rsa.md +++ b/unison-src/transcripts/rsa.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/scope-ref.md b/unison-src/transcripts/scope-ref.md index 67fcbc336..1abf26be2 100644 --- a/unison-src/transcripts/scope-ref.md +++ b/unison-src/transcripts/scope-ref.md @@ -2,7 +2,7 @@ A short script to test mutable references with local scope. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison diff --git a/unison-src/transcripts/suffixes.md b/unison-src/transcripts/suffixes.md index 3a4c47933..7245b4cb3 100644 --- a/unison-src/transcripts/suffixes.md +++ b/unison-src/transcripts/suffixes.md @@ -1,7 +1,7 @@ # Suffix-based resolution of names ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Any unique name suffix can be used to refer to a definition. For instance: @@ -20,15 +20,15 @@ optional.isNone = cases This also affects commands like find. Notice lack of qualified names in output: ```ucm -.> add -.> find take +scratch/main> add +scratch/main> find take ``` The `view` and `display` commands also benefit from this: ```ucm -.> view List.drop -.> display bar.a +scratch/main> view List.drop +scratch/main> display bar.a ``` In the signature, we don't see `base.Nat`, just `Nat`. The full declaration name is still shown for each search result though. @@ -36,7 +36,7 @@ In the signature, we don't see `base.Nat`, just `Nat`. The full declaration name Type-based search also benefits from this, we can just say `Nat` rather than `.base.Nat`: ```ucm -.> find : Nat -> [a] -> [a] +scratch/main> find : Nat -> [a] -> [a] ``` ## Preferring names not in `lib.*.lib.*` @@ -51,7 +51,7 @@ lib.distributed.lib.baz.qux = "indirect dependency" ``` ```ucm -.> add +scratch/main> add ``` ```unison:error @@ -63,15 +63,15 @@ lib.distributed.lib.baz.qux = "indirect dependency" ``` ```ucm -.> view abra.cadabra -.> view baz.qux +scratch/main> view abra.cadabra +scratch/main> view baz.qux ``` Note that we can always still view indirect dependencies by using more name segments: ```ucm -.> view distributed.abra.cadabra -.> names distributed.lib.baz.qux +scratch/main> view distributed.abra.cadabra +scratch/main> names distributed.lib.baz.qux ``` ## Corner cases @@ -86,7 +86,7 @@ bar = 100 ``` ```ucm -.> add +scratch/main> add ``` ```unison diff --git a/unison-src/transcripts/suffixes.output.md b/unison-src/transcripts/suffixes.output.md index 21aeafa44..411fdebba 100644 --- a/unison-src/transcripts/suffixes.output.md +++ b/unison-src/transcripts/suffixes.output.md @@ -16,14 +16,14 @@ optional.isNone = cases This also affects commands like find. Notice lack of qualified names in output: ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: foo.bar.a : Int optional.isNone : Optional a -> Boolean -.> find take +scratch/main> find take 1. builtin.Bytes.take : Nat -> Bytes -> Bytes 2. builtin.List.take : Nat -> [a] -> [a] @@ -36,11 +36,11 @@ This also affects commands like find. Notice lack of qualified names in output: The `view` and `display` commands also benefit from this: ```ucm -.> view List.drop +scratch/main> view List.drop builtin builtin.List.drop : builtin.Nat -> [a] -> [a] -.> display bar.a +scratch/main> display bar.a +99 @@ -50,7 +50,7 @@ In the signature, we don't see `base.Nat`, just `Nat`. The full declaration name Type-based search also benefits from this, we can just say `Nat` rather than `.base.Nat`: ```ucm -.> find : Nat -> [a] -> [a] +scratch/main> find : Nat -> [a] -> [a] 1. builtin.List.drop : Nat -> [a] -> [a] 2. builtin.List.take : Nat -> [a] -> [a] @@ -85,7 +85,7 @@ lib.distributed.lib.baz.qux = "indirect dependency" ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -138,7 +138,7 @@ lib.distributed.lib.baz.qux = "indirect dependency" ``` ```ucm -.> view abra.cadabra +scratch/main> view abra.cadabra cool.abra.cadabra : Text cool.abra.cadabra = "my project" @@ -146,7 +146,7 @@ lib.distributed.lib.baz.qux = "indirect dependency" lib.distributed.abra.cadabra : Text lib.distributed.abra.cadabra = "direct dependency 1" -.> view baz.qux +scratch/main> view baz.qux lib.distributed.baz.qux : Text lib.distributed.baz.qux = "direct dependency 2" @@ -155,12 +155,12 @@ lib.distributed.lib.baz.qux = "indirect dependency" Note that we can always still view indirect dependencies by using more name segments: ```ucm -.> view distributed.abra.cadabra +scratch/main> view distributed.abra.cadabra lib.distributed.abra.cadabra : Text lib.distributed.abra.cadabra = "direct dependency 1" -.> names distributed.lib.baz.qux +scratch/main> names distributed.lib.baz.qux Term Hash: #nhup096n2s @@ -181,7 +181,7 @@ bar = 100 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: diff --git a/unison-src/transcripts/sum-type-update-conflicts.md b/unison-src/transcripts/sum-type-update-conflicts.md index ce2993185..1abf98f3b 100644 --- a/unison-src/transcripts/sum-type-update-conflicts.md +++ b/unison-src/transcripts/sum-type-update-conflicts.md @@ -3,7 +3,7 @@ https://github.com/unisonweb/unison/issues/2786 ```ucm:hide -.ns> builtins.merge +scratch/main> builtins.merge lib.builtins ``` First we add a sum-type to the codebase. @@ -13,7 +13,7 @@ structural type X = x ``` ```ucm -.ns> add +scratch/main> add ``` Now we update the type, changing the name of the constructors, _but_, we simultaneously @@ -32,5 +32,5 @@ This update should succeed since the conflicted constructor is removed in the same update that the new term is being added. ```ucm -.ns> update.old +scratch/main> update.old ``` diff --git a/unison-src/transcripts/sum-type-update-conflicts.output.md b/unison-src/transcripts/sum-type-update-conflicts.output.md index fc45a547b..493a4d940 100644 --- a/unison-src/transcripts/sum-type-update-conflicts.output.md +++ b/unison-src/transcripts/sum-type-update-conflicts.output.md @@ -19,16 +19,16 @@ structural type X = x ⍟ These new definitions are ok to `add`: structural type X - (also named builtin.Unit) + (also named lib.builtins.Unit) ``` ```ucm -.ns> add +scratch/main> add ⍟ I've added these definitions: structural type X - (also named builtin.Unit) + (also named lib.builtins.Unit) ``` Now we update the type, changing the name of the constructors, _but_, we simultaneously @@ -60,14 +60,14 @@ dependsOnX = Text.size X.x new definition: structural type X - (The old definition is also named builtin.Unit.) + (The old definition is also named lib.builtins.Unit.) ``` This update should succeed since the conflicted constructor is removed in the same update that the new term is being added. ```ucm -.ns> update.old +scratch/main> update.old ⍟ I've added these definitions: @@ -77,6 +77,6 @@ is removed in the same update that the new term is being added. ⍟ I've updated these names to your new definition: structural type X - (The old definition was also named builtin.Unit.) + (The old definition was also named lib.builtins.Unit.) ``` diff --git a/unison-src/transcripts/switch-command.md b/unison-src/transcripts/switch-command.md index c1a2bca96..13e33c858 100644 --- a/unison-src/transcripts/switch-command.md +++ b/unison-src/transcripts/switch-command.md @@ -22,8 +22,8 @@ the current project can be preceded by a forward slash (which makes it unambiguo forward slash (which makes it unambiguous). ```ucm -.> switch foo -.> switch foo/topic +scratch/main> switch foo +scratch/main> switch foo/topic foo/main> switch topic foo/main> switch /topic foo/main> switch bar/ @@ -38,11 +38,11 @@ foo/main> switch bar It's an error to try to switch to something that doesn't exist, of course. ```ucm:error -.> switch foo/no-such-branch +scratch/main> switch foo/no-such-branch ``` ```ucm:error -.> switch no-such-project +scratch/main> switch no-such-project ``` ```ucm:error diff --git a/unison-src/transcripts/switch-command.output.md b/unison-src/transcripts/switch-command.output.md index 2542da7b3..e84fefd0a 100644 --- a/unison-src/transcripts/switch-command.output.md +++ b/unison-src/transcripts/switch-command.output.md @@ -46,9 +46,9 @@ the current project can be preceded by a forward slash (which makes it unambiguo forward slash (which makes it unambiguous). ```ucm -.> switch foo +scratch/main> switch foo -.> switch foo/topic +scratch/main> switch foo/topic foo/main> switch topic @@ -74,15 +74,16 @@ foo/main> switch bar It's an error to try to switch to something that doesn't exist, of course. ```ucm -.> switch foo/no-such-branch +scratch/main> switch foo/no-such-branch foo/no-such-branch does not exist. ``` ```ucm -.> switch no-such-project +scratch/main> switch no-such-project - no-such-project does not exist. + Neither project no-such-project nor branch /no-such-project + exists. ``` ```ucm diff --git a/unison-src/transcripts/tab-completion.md b/unison-src/transcripts/tab-completion.md index c35c4ba34..c270308fa 100644 --- a/unison-src/transcripts/tab-completion.md +++ b/unison-src/transcripts/tab-completion.md @@ -5,8 +5,8 @@ Test that tab completion works as expected. ## Tab Complete Command Names ```ucm -.> debug.tab-complete vi -.> debug.tab-complete delete. +scratch/main> debug.tab-complete vi +scratch/main> debug.tab-complete delete. ``` ## Tab complete terms & types @@ -21,35 +21,43 @@ unique type subnamespace.AType = A | B ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -- Should tab complete namespaces since they may contain terms/types -.> debug.tab-complete view sub +scratch/main> debug.tab-complete view sub -- Should not complete things from child namespaces of the current query if there are other completions at this level -.> debug.tab-complete view subnamespace +scratch/main> debug.tab-complete view subnamespace -- Should complete things from child namespaces of the current query if it's dot-suffixed -.> debug.tab-complete view subnamespace. +scratch/main> debug.tab-complete view subnamespace. -- Should complete things from child namespaces of the current query if there are no more completions at this level. -.> debug.tab-complete view subnamespace2 +scratch/main> debug.tab-complete view subnamespace2 -- Should prefix-filter by query suffix -.> debug.tab-complete view subnamespace.some -.> debug.tab-complete view subnamespace.someOther +scratch/main> debug.tab-complete view subnamespace.some +scratch/main> debug.tab-complete view subnamespace.someOther +``` + +```unison:hide +absolute.term = "absolute" +``` + +```ucm +.> add -- Should tab complete absolute names -.othernamespace> debug.tab-complete view .subnamespace.some +.> debug.tab-complete view .absolute.te ``` ## Tab complete namespaces ```ucm -- Should tab complete namespaces -.> debug.tab-complete find-in sub -.> debug.tab-complete find-in subnamespace -.> debug.tab-complete find-in subnamespace. -.> debug.tab-complete io.test sub -.> debug.tab-complete io.test subnamespace -.> debug.tab-complete io.test subnamespace. +scratch/main> debug.tab-complete find-in sub +scratch/main> debug.tab-complete find-in subnamespace +scratch/main> debug.tab-complete find-in subnamespace. +scratch/main> debug.tab-complete io.test sub +scratch/main> debug.tab-complete io.test subnamespace +scratch/main> debug.tab-complete io.test subnamespace. ``` Tab Complete Delete Subcommands @@ -61,9 +69,9 @@ add b = b ``` ```ucm -.> update.old -.> debug.tab-complete delete.type Foo -.> debug.tab-complete delete.term add +scratch/main> update.old +scratch/main> debug.tab-complete delete.type Foo +scratch/main> debug.tab-complete delete.term add ``` ## Tab complete projects and branches diff --git a/unison-src/transcripts/tab-completion.output.md b/unison-src/transcripts/tab-completion.output.md index 82961cfd5..c7730c17d 100644 --- a/unison-src/transcripts/tab-completion.output.md +++ b/unison-src/transcripts/tab-completion.output.md @@ -5,12 +5,12 @@ Test that tab completion works as expected. ## Tab Complete Command Names ```ucm -.> debug.tab-complete vi +scratch/main> debug.tab-complete vi view view.global -.> debug.tab-complete delete. +scratch/main> debug.tab-complete delete. delete.branch delete.namespace @@ -53,19 +53,19 @@ unique type subnamespace.AType = A | B ``` ```ucm -- Should tab complete namespaces since they may contain terms/types -.> debug.tab-complete view sub +scratch/main> debug.tab-complete view sub subnamespace. subnamespace2. -- Should not complete things from child namespaces of the current query if there are other completions at this level -.> debug.tab-complete view subnamespace +scratch/main> debug.tab-complete view subnamespace subnamespace. subnamespace2. -- Should complete things from child namespaces of the current query if it's dot-suffixed -.> debug.tab-complete view subnamespace. +scratch/main> debug.tab-complete view subnamespace. * subnamespace.AType subnamespace.AType. @@ -73,57 +73,68 @@ unique type subnamespace.AType = A | B * subnamespace.someOtherName -- Should complete things from child namespaces of the current query if there are no more completions at this level. -.> debug.tab-complete view subnamespace2 +scratch/main> debug.tab-complete view subnamespace2 subnamespace2. * subnamespace2.thing -- Should prefix-filter by query suffix -.> debug.tab-complete view subnamespace.some +scratch/main> debug.tab-complete view subnamespace.some * subnamespace.someName * subnamespace.someOtherName -.> debug.tab-complete view subnamespace.someOther +scratch/main> debug.tab-complete view subnamespace.someOther * subnamespace.someOtherName --- Should tab complete absolute names -.othernamespace> debug.tab-complete view .subnamespace.some +``` +```unison +absolute.term = "absolute" +``` - * .subnamespace.someName - * .subnamespace.someOtherName +```ucm +.> add + + ⍟ I've added these definitions: + + absolute.term : ##Text + +-- Should tab complete absolute names +.> debug.tab-complete view .absolute.te + + * .absolute.term ``` ## Tab complete namespaces ```ucm -- Should tab complete namespaces -.> debug.tab-complete find-in sub +scratch/main> debug.tab-complete find-in sub subnamespace subnamespace2 -.> debug.tab-complete find-in subnamespace +scratch/main> debug.tab-complete find-in subnamespace subnamespace subnamespace2 -.> debug.tab-complete find-in subnamespace. +scratch/main> debug.tab-complete find-in subnamespace. subnamespace.AType -.> debug.tab-complete io.test sub +scratch/main> debug.tab-complete io.test sub subnamespace. subnamespace2. -.> debug.tab-complete io.test subnamespace +scratch/main> debug.tab-complete io.test subnamespace subnamespace. subnamespace2. -.> debug.tab-complete io.test subnamespace. +scratch/main> debug.tab-complete io.test subnamespace. subnamespace.AType. * subnamespace.someName @@ -153,19 +164,19 @@ add b = b ``` ```ucm -.> update.old +scratch/main> update.old ⍟ I've added these definitions: type Foo add : a -> a -.> debug.tab-complete delete.type Foo +scratch/main> debug.tab-complete delete.type Foo * Foo Foo. -.> debug.tab-complete delete.term add +scratch/main> debug.tab-complete delete.term add * add diff --git a/unison-src/transcripts/test-command.md b/unison-src/transcripts/test-command.md index 2f95c846b..aedcb1b59 100644 --- a/unison-src/transcripts/test-command.md +++ b/unison-src/transcripts/test-command.md @@ -1,7 +1,7 @@ Merge builtins so we get enough names for the testing stuff. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` The `test` command should run all of the tests in the current directory. @@ -15,43 +15,43 @@ foo.test2 = [Ok "test2"] ``` ```ucm:hide -.> add +scratch/main> add ``` ```ucm -.> test +scratch/main> test ``` Tests should be cached if unchanged. ```ucm -.> test +scratch/main> test ``` `test` won't descend into the `lib` namespace, but `test.all` will. ```unison -testInLib : [Result] -testInLib = [Ok "testInLib"] +lib.dep.testInLib : [Result] +lib.dep.testInLib = [Ok "testInLib"] ``` ```ucm:hide -.lib> add +scratch/main> add ``` ```ucm -.> test -.> test.all +scratch/main> test +scratch/main> test.all ``` -`test` WILL run tests within `lib` if ucm is cd'd inside. +`test` WILL run tests within `lib` if specified explicitly. ```ucm -.lib> test +scratch/main> test lib.dep ``` `test` can be given a relative path, in which case it will only run tests found somewhere in that namespace. ```ucm -.> test foo +scratch/main> test foo ``` diff --git a/unison-src/transcripts/test-command.output.md b/unison-src/transcripts/test-command.output.md index ccd73793e..4e2d9bafe 100644 --- a/unison-src/transcripts/test-command.output.md +++ b/unison-src/transcripts/test-command.output.md @@ -25,7 +25,7 @@ foo.test2 = [Ok "test2"] ``` ```ucm -.> test +scratch/main> test ✅ @@ -50,7 +50,7 @@ foo.test2 = [Ok "test2"] Tests should be cached if unchanged. ```ucm -.> test +scratch/main> test Cached test results (`help testcache` to learn more) @@ -65,8 +65,8 @@ Tests should be cached if unchanged. `test` won't descend into the `lib` namespace, but `test.all` will. ```unison -testInLib : [Result] -testInLib = [Ok "testInLib"] +lib.dep.testInLib : [Result] +lib.dep.testInLib = [Ok "testInLib"] ``` ```ucm @@ -79,11 +79,11 @@ testInLib = [Ok "testInLib"] ⍟ These new definitions are ok to `add`: - testInLib : [Result] + lib.dep.testInLib : [Result] ``` ```ucm -.> test +scratch/main> test Cached test results (`help testcache` to learn more) @@ -94,7 +94,7 @@ testInLib = [Ok "testInLib"] Tip: Use view 1 to view the source of a test. -.> test.all +scratch/main> test.all Cached test results (`help testcache` to learn more) @@ -112,21 +112,21 @@ testInLib = [Ok "testInLib"] New test results: - 1. lib.testInLib ◉ testInLib + 1. lib.dep.testInLib ◉ testInLib ✅ 1 test(s) passing Tip: Use view 1 to view the source of a test. ``` -`test` WILL run tests within `lib` if ucm is cd'd inside. +`test` WILL run tests within `lib` if specified explicitly. ```ucm -.lib> test +scratch/main> test lib.dep Cached test results (`help testcache` to learn more) - 1. testInLib ◉ testInLib + 1. lib.dep.testInLib ◉ testInLib ✅ 1 test(s) passing @@ -136,7 +136,7 @@ testInLib = [Ok "testInLib"] `test` can be given a relative path, in which case it will only run tests found somewhere in that namespace. ```ucm -.> test foo +scratch/main> test foo Cached test results (`help testcache` to learn more) diff --git a/unison-src/transcripts/text-literals.md b/unison-src/transcripts/text-literals.md index 06898d145..3d3b1359a 100644 --- a/unison-src/transcripts/text-literals.md +++ b/unison-src/transcripts/text-literals.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` This transcript shows some syntax for raw text literals. @@ -37,6 +37,6 @@ lit2 = """" ``` ```ucm -.> add -.> view lit1 lit2 +scratch/main> add +scratch/main> view lit1 lit2 ``` \ No newline at end of file diff --git a/unison-src/transcripts/text-literals.output.md b/unison-src/transcripts/text-literals.output.md index efb094d98..1889ec8e7 100644 --- a/unison-src/transcripts/text-literals.output.md +++ b/unison-src/transcripts/text-literals.output.md @@ -87,14 +87,14 @@ lit2 = """" ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: lit1 : Text lit2 : Text -.> view lit1 lit2 +scratch/main> view lit1 lit2 lit1 : Text lit1 = diff --git a/unison-src/transcripts/todo-bug-builtins.md b/unison-src/transcripts/todo-bug-builtins.md index c7d88fb78..e472204d4 100644 --- a/unison-src/transcripts/todo-bug-builtins.md +++ b/unison-src/transcripts/todo-bug-builtins.md @@ -1,7 +1,7 @@ # The `todo` and `bug` builtin ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` `todo` and `bug` have type `a -> b`. They take a message or a value of type `a` and crash during runtime displaying `a` in ucm. diff --git a/unison-src/transcripts/top-level-exceptions.md b/unison-src/transcripts/top-level-exceptions.md index 874998474..4caf9d717 100644 --- a/unison-src/transcripts/top-level-exceptions.md +++ b/unison-src/transcripts/top-level-exceptions.md @@ -2,13 +2,13 @@ A simple transcript to test the use of exceptions that bubble to the top level. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` FYI, here are the `Exception` and `Failure` types: ```ucm -.> view Exception Failure +scratch/main> view Exception Failure ``` Here's a sample program just to verify that the typechecker allows `run` to throw exceptions: @@ -24,9 +24,9 @@ mytest _ = [Ok "Great"] ``` ```ucm -.> run main -.> add -.> io.test mytest +scratch/main> run main +scratch/main> add +scratch/main> io.test mytest ``` Now a test to show the handling of uncaught exceptions: @@ -42,5 +42,5 @@ unique type RuntimeError = ``` ```ucm:error -.> run main2 +scratch/main> run main2 ``` diff --git a/unison-src/transcripts/top-level-exceptions.output.md b/unison-src/transcripts/top-level-exceptions.output.md index 7f225434d..6624fbd23 100644 --- a/unison-src/transcripts/top-level-exceptions.output.md +++ b/unison-src/transcripts/top-level-exceptions.output.md @@ -4,7 +4,7 @@ A simple transcript to test the use of exceptions that bubble to the top level. FYI, here are the `Exception` and `Failure` types: ```ucm -.> view Exception Failure +scratch/main> view Exception Failure structural ability builtin.Exception where raise : Failure ->{builtin.Exception} x @@ -40,18 +40,18 @@ mytest _ = [Ok "Great"] ``` ```ucm -.> run main +scratch/main> run main () -.> add +scratch/main> add ⍟ I've added these definitions: main : '{IO, Exception} () mytest : '{IO, Exception} [Result] -.> io.test mytest +scratch/main> io.test mytest New test results: @@ -90,7 +90,7 @@ unique type RuntimeError = ``` ```ucm -.> run main2 +scratch/main> run main2 💔💥 diff --git a/unison-src/transcripts/type-deps.md b/unison-src/transcripts/type-deps.md index 142265c78..e63b539d5 100644 --- a/unison-src/transcripts/type-deps.md +++ b/unison-src/transcripts/type-deps.md @@ -3,7 +3,7 @@ https://github.com/unisonweb/unison/pull/2821 ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` @@ -14,7 +14,7 @@ structural type Y = Y ``` ```ucm:hide -.> add +scratch/main> add ``` Now, we update `Y`, and add a new type `Z` which depends on it. @@ -26,7 +26,7 @@ structural type Y = Y Nat Adding should fail for BOTH definitions, `Y` needs an update and `Z` is blocked by `Y`. ```ucm:error -.> add +scratch/main> add -- This shouldn't exist, because it should've been blocked. -.> view Z +scratch/main> view Z ``` diff --git a/unison-src/transcripts/type-deps.output.md b/unison-src/transcripts/type-deps.output.md index b3a18e310..ad1205e1e 100644 --- a/unison-src/transcripts/type-deps.output.md +++ b/unison-src/transcripts/type-deps.output.md @@ -36,7 +36,7 @@ structural type Y = Y Nat ``` Adding should fail for BOTH definitions, `Y` needs an update and `Z` is blocked by `Y`. ```ucm -.> add +scratch/main> add x These definitions failed: @@ -47,7 +47,7 @@ Adding should fail for BOTH definitions, `Y` needs an update and `Z` is blocked Tip: Use `help filestatus` to learn more. -- This shouldn't exist, because it should've been blocked. -.> view Z +scratch/main> view Z ⚠️ diff --git a/unison-src/transcripts/type-modifier-are-optional.md b/unison-src/transcripts/type-modifier-are-optional.md index abce0ad0b..f0a13f59e 100644 --- a/unison-src/transcripts/type-modifier-are-optional.md +++ b/unison-src/transcripts/type-modifier-are-optional.md @@ -1,7 +1,7 @@ # Type modifiers are optional, `unique` is the default. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Types and abilities may be prefixed with either `unique` or `structural`. When left unspecified, `unique` is assumed. diff --git a/unison-src/transcripts/unique-type-churn.md b/unison-src/transcripts/unique-type-churn.md index 904e1c480..d35b2fa09 100644 --- a/unison-src/transcripts/unique-type-churn.md +++ b/unison-src/transcripts/unique-type-churn.md @@ -9,7 +9,7 @@ unique type C = C B ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -22,7 +22,7 @@ unique type C = C B If the name stays the same, the churn is even prevented if the type is updated and then reverted to the original form. ```ucm -.> names A +scratch/main> names A ``` ```unison @@ -30,8 +30,8 @@ unique type A = A () ``` ```ucm -.> update -.> names A +scratch/main> update +scratch/main> names A ``` ```unison @@ -41,6 +41,6 @@ unique type A = A Note that `A` is back to its original hash. ```ucm -.> update -.> names A +scratch/main> update +scratch/main> names A ``` diff --git a/unison-src/transcripts/unique-type-churn.output.md b/unison-src/transcripts/unique-type-churn.output.md index bcee03f59..74076d8c6 100644 --- a/unison-src/transcripts/unique-type-churn.output.md +++ b/unison-src/transcripts/unique-type-churn.output.md @@ -24,7 +24,7 @@ unique type C = C B ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,7 +51,7 @@ unique type C = C B If the name stays the same, the churn is even prevented if the type is updated and then reverted to the original form. ```ucm -.> names A +scratch/main> names A Type Hash: #uj8oalgadr @@ -83,14 +83,14 @@ unique type A = A () ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> names A +scratch/main> names A Type Hash: #ufo5tuc7ho @@ -124,14 +124,14 @@ unique type A = A Note that `A` is back to its original hash. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> names A +scratch/main> names A Type Hash: #uj8oalgadr diff --git a/unison-src/transcripts/unitnamespace.md b/unison-src/transcripts/unitnamespace.md index 0f6838dae..c1f9f5fc5 100644 --- a/unison-src/transcripts/unitnamespace.md +++ b/unison-src/transcripts/unitnamespace.md @@ -1,10 +1,10 @@ ```unison -foo = "bar" +`()`.foo = "bar" ``` ```ucm -.`()`> add -.> find -.> find-in `()` -.> delete.namespace `()` +scratch/main> add +scratch/main> find +scratch/main> find-in `()` +scratch/main> delete.namespace `()` ``` diff --git a/unison-src/transcripts/unitnamespace.output.md b/unison-src/transcripts/unitnamespace.output.md index 9e18ea08e..a3d7b3956 100644 --- a/unison-src/transcripts/unitnamespace.output.md +++ b/unison-src/transcripts/unitnamespace.output.md @@ -1,5 +1,5 @@ ```unison -foo = "bar" +`()`.foo = "bar" ``` ```ucm @@ -12,29 +12,27 @@ foo = "bar" ⍟ These new definitions are ok to `add`: - foo : ##Text + `()`.foo : ##Text ``` ```ucm - ☝️ The namespace .`()` is empty. - -.`()`> add +scratch/main> add ⍟ I've added these definitions: - foo : ##Text + `()`.foo : ##Text -.> find +scratch/main> find 1. `()`.foo : ##Text -.> find-in `()` +scratch/main> find-in `()` 1. foo : ##Text -.> delete.namespace `()` +scratch/main> delete.namespace `()` Done. diff --git a/unison-src/transcripts/universal-cmp.md b/unison-src/transcripts/universal-cmp.md index 2364cb39c..7e41982e9 100644 --- a/unison-src/transcripts/universal-cmp.md +++ b/unison-src/transcripts/universal-cmp.md @@ -3,7 +3,7 @@ File for test cases making sure that universal equality/comparison cases exist for built-in types. Just making sure they don't crash. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -16,8 +16,8 @@ threadEyeDeez _ = ``` ```ucm -.> add -.> run threadEyeDeez +scratch/main> add +scratch/main> run threadEyeDeez ``` ```unison diff --git a/unison-src/transcripts/universal-cmp.output.md b/unison-src/transcripts/universal-cmp.output.md index ec03128e8..b1f07fddf 100644 --- a/unison-src/transcripts/universal-cmp.output.md +++ b/unison-src/transcripts/universal-cmp.output.md @@ -26,14 +26,14 @@ threadEyeDeez _ = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: type A threadEyeDeez : ∀ _. _ ->{IO} (Boolean, Boolean) -.> run threadEyeDeez +scratch/main> run threadEyeDeez (false, true) diff --git a/unison-src/transcripts/unsafe-coerce.md b/unison-src/transcripts/unsafe-coerce.md index ab3c38481..9b483f9bb 100644 --- a/unison-src/transcripts/unsafe-coerce.md +++ b/unison-src/transcripts/unsafe-coerce.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -17,7 +17,7 @@ main _ = ``` ```ucm -.> find unsafe.coerceAbilities -.> add -.> io.test main +scratch/main> find unsafe.coerceAbilities +scratch/main> add +scratch/main> io.test main ``` diff --git a/unison-src/transcripts/unsafe-coerce.output.md b/unison-src/transcripts/unsafe-coerce.output.md index f9b84c74c..62eb29845 100644 --- a/unison-src/transcripts/unsafe-coerce.output.md +++ b/unison-src/transcripts/unsafe-coerce.output.md @@ -28,12 +28,12 @@ main _ = ``` ```ucm -.> find unsafe.coerceAbilities +scratch/main> find unsafe.coerceAbilities 1. builtin.unsafe.coerceAbilities : (a ->{e1} b) -> a -> b -.> add +scratch/main> add ⍟ I've added these definitions: @@ -41,7 +41,7 @@ main _ = fc : '{IO, Exception} Nat main : '{IO, Exception} [Result] -.> io.test main +scratch/main> io.test main New test results: diff --git a/unison-src/transcripts/update-ignores-lib-namespace.md b/unison-src/transcripts/update-ignores-lib-namespace.md index 04498e48a..2db633f14 100644 --- a/unison-src/transcripts/update-ignores-lib-namespace.md +++ b/unison-src/transcripts/update-ignores-lib-namespace.md @@ -3,7 +3,7 @@ the project organization convention that dependencies are put in "lib"; it's muc one's own code if the "lib" namespace is simply ignored. ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -12,7 +12,7 @@ lib.foo = 100 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -20,6 +20,6 @@ foo = 200 ``` ```ucm -.> update -.> names foo +scratch/main> update +scratch/main> names foo ``` diff --git a/unison-src/transcripts/update-ignores-lib-namespace.output.md b/unison-src/transcripts/update-ignores-lib-namespace.output.md index 5711f81a8..e7026d6f3 100644 --- a/unison-src/transcripts/update-ignores-lib-namespace.output.md +++ b/unison-src/transcripts/update-ignores-lib-namespace.output.md @@ -22,7 +22,7 @@ lib.foo = 100 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -50,14 +50,14 @@ foo = 200 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> names foo +scratch/main> names foo Term Hash: #9ntnotdp87 diff --git a/unison-src/transcripts/update-term-aliases-in-different-ways.md b/unison-src/transcripts/update-term-aliases-in-different-ways.md index fd8a8816c..e99deb63b 100644 --- a/unison-src/transcripts/update-term-aliases-in-different-ways.md +++ b/unison-src/transcripts/update-term-aliases-in-different-ways.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -11,7 +11,7 @@ bar = 5 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -23,6 +23,6 @@ bar = 7 ``` ```ucm -.> update -.> view foo bar +scratch/main> update +scratch/main> view foo bar ``` diff --git a/unison-src/transcripts/update-term-aliases-in-different-ways.output.md b/unison-src/transcripts/update-term-aliases-in-different-ways.output.md index 2d7960976..10e8303ca 100644 --- a/unison-src/transcripts/update-term-aliases-in-different-ways.output.md +++ b/unison-src/transcripts/update-term-aliases-in-different-ways.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -27,7 +27,7 @@ bar = 5 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -61,14 +61,14 @@ bar = 7 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view foo bar +scratch/main> view foo bar bar : Nat bar = 7 diff --git a/unison-src/transcripts/update-term-to-different-type.md b/unison-src/transcripts/update-term-to-different-type.md index 3fa5a735f..31859e3a1 100644 --- a/unison-src/transcripts/update-term-to-different-type.md +++ b/unison-src/transcripts/update-term-to-different-type.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -8,7 +8,7 @@ foo = 5 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -17,6 +17,6 @@ foo = +5 ``` ```ucm -.> update -.> view foo +scratch/main> update +scratch/main> view foo ``` diff --git a/unison-src/transcripts/update-term-to-different-type.output.md b/unison-src/transcripts/update-term-to-different-type.output.md index 7f6bf57cc..b1cad29f4 100644 --- a/unison-src/transcripts/update-term-to-different-type.output.md +++ b/unison-src/transcripts/update-term-to-different-type.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -23,7 +23,7 @@ foo = 5 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -50,14 +50,14 @@ foo = +5 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view foo +scratch/main> view foo foo : Int foo = +5 diff --git a/unison-src/transcripts/update-term-with-alias.md b/unison-src/transcripts/update-term-with-alias.md index b3c5e9e79..e45eb8b76 100644 --- a/unison-src/transcripts/update-term-with-alias.md +++ b/unison-src/transcripts/update-term-with-alias.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -11,7 +11,7 @@ bar = 5 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -20,6 +20,6 @@ foo = 6 ``` ```ucm -.> update -.> view foo bar +scratch/main> update +scratch/main> view foo bar ``` diff --git a/unison-src/transcripts/update-term-with-alias.output.md b/unison-src/transcripts/update-term-with-alias.output.md index abf21943a..785a5e0d6 100644 --- a/unison-src/transcripts/update-term-with-alias.output.md +++ b/unison-src/transcripts/update-term-with-alias.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -27,7 +27,7 @@ bar = 5 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -56,14 +56,14 @@ foo = 6 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view foo bar +scratch/main> view foo bar bar : Nat bar = 5 diff --git a/unison-src/transcripts/update-term-with-dependent-to-different-type.md b/unison-src/transcripts/update-term-with-dependent-to-different-type.md index c9d6388dc..b7bd1196a 100644 --- a/unison-src/transcripts/update-term-with-dependent-to-different-type.md +++ b/unison-src/transcripts/update-term-with-dependent-to-different-type.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -11,7 +11,7 @@ bar = foo + 10 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -20,5 +20,5 @@ foo = +5 ``` ```ucm:error -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-term-with-dependent-to-different-type.output.md b/unison-src/transcripts/update-term-with-dependent-to-different-type.output.md index 1a62cebf4..c2357e31e 100644 --- a/unison-src/transcripts/update-term-with-dependent-to-different-type.output.md +++ b/unison-src/transcripts/update-term-with-dependent-to-different-type.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -27,7 +27,7 @@ bar = foo + 10 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -55,7 +55,7 @@ foo = +5 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-term-with-dependent.md b/unison-src/transcripts/update-term-with-dependent.md index d7aa6b3db..402138857 100644 --- a/unison-src/transcripts/update-term-with-dependent.md +++ b/unison-src/transcripts/update-term-with-dependent.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -11,7 +11,7 @@ bar = foo + 10 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -20,6 +20,6 @@ foo = 6 ``` ```ucm -.> update -.> view bar +scratch/main> update +scratch/main> view bar ``` diff --git a/unison-src/transcripts/update-term-with-dependent.output.md b/unison-src/transcripts/update-term-with-dependent.output.md index dc2d66f72..9acbb2b7b 100644 --- a/unison-src/transcripts/update-term-with-dependent.output.md +++ b/unison-src/transcripts/update-term-with-dependent.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -27,7 +27,7 @@ bar = foo + 10 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -55,7 +55,7 @@ foo = 6 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -66,7 +66,7 @@ foo = 6 Done. -.> view bar +scratch/main> view bar bar : Nat bar = diff --git a/unison-src/transcripts/update-term.md b/unison-src/transcripts/update-term.md index 0fbb55357..0cdc0e86f 100644 --- a/unison-src/transcripts/update-term.md +++ b/unison-src/transcripts/update-term.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -8,7 +8,7 @@ foo = 5 ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -17,6 +17,6 @@ foo = 6 ``` ```ucm -.> update -.> view foo +scratch/main> update +scratch/main> view foo ``` diff --git a/unison-src/transcripts/update-term.output.md b/unison-src/transcripts/update-term.output.md index 1a641671e..26bb87579 100644 --- a/unison-src/transcripts/update-term.output.md +++ b/unison-src/transcripts/update-term.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -23,7 +23,7 @@ foo = 5 ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -50,14 +50,14 @@ foo = 6 ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view foo +scratch/main> view foo foo : Nat foo = 6 diff --git a/unison-src/transcripts/update-test-to-non-test.md b/unison-src/transcripts/update-test-to-non-test.md index a25ad0d3e..0c2ba33f8 100644 --- a/unison-src/transcripts/update-test-to-non-test.md +++ b/unison-src/transcripts/update-test-to-non-test.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge ``` ```unison @@ -9,8 +9,8 @@ test> foo = [] After adding the test `foo`, we expect `view` to render it like a test. (Bug: It doesn't.) ```ucm -.> add -.> view foo +scratch/main> add +scratch/main> view foo ``` ```unison @@ -20,6 +20,6 @@ foo = 1 After updating `foo` to not be a test, we expect `view` to not render it like a test. ```ucm -.> update -.> view foo +scratch/main> update +scratch/main> view foo ``` diff --git a/unison-src/transcripts/update-test-to-non-test.output.md b/unison-src/transcripts/update-test-to-non-test.output.md index a3a016e73..f08dd4bb9 100644 --- a/unison-src/transcripts/update-test-to-non-test.output.md +++ b/unison-src/transcripts/update-test-to-non-test.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.merge +scratch/main> builtins.merge Done. @@ -30,13 +30,13 @@ test> foo = [] After adding the test `foo`, we expect `view` to render it like a test. (Bug: It doesn't.) ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: foo : [Result] -.> view foo +scratch/main> view foo foo : [Result] foo = [] @@ -63,14 +63,14 @@ foo = 1 After updating `foo` to not be a test, we expect `view` to not render it like a test. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view foo +scratch/main> view foo foo : Nat foo = 1 diff --git a/unison-src/transcripts/update-test-watch-roundtrip.md b/unison-src/transcripts/update-test-watch-roundtrip.md index a3ea386ef..135412df6 100644 --- a/unison-src/transcripts/update-test-watch-roundtrip.md +++ b/unison-src/transcripts/update-test-watch-roundtrip.md @@ -1,6 +1,6 @@ ```ucm:hide -.> builtins.merge +scratch/main> builtins.merge ``` Given a test that depends on another definition, @@ -14,7 +14,7 @@ test> mynamespace.foo.test = ``` ```ucm -.> add +scratch/main> add ``` if we change the type of the dependency, the test should show in the scratch file as a test watch. @@ -24,5 +24,5 @@ foo n = "hello, world!" ``` ```ucm:error -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-test-watch-roundtrip.output.md b/unison-src/transcripts/update-test-watch-roundtrip.output.md index b3db6133d..2f1959eb5 100644 --- a/unison-src/transcripts/update-test-watch-roundtrip.output.md +++ b/unison-src/transcripts/update-test-watch-roundtrip.output.md @@ -10,7 +10,7 @@ test> mynamespace.foo.test = ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -39,7 +39,7 @@ foo n = "hello, world!" ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-add-constructor.md b/unison-src/transcripts/update-type-add-constructor.md index b801106c2..1decf3015 100644 --- a/unison-src/transcripts/update-type-add-constructor.md +++ b/unison-src/transcripts/update-type-add-constructor.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -8,7 +8,7 @@ unique type Foo ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -18,7 +18,7 @@ unique type Foo ``` ```ucm -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-add-constructor.output.md b/unison-src/transcripts/update-type-add-constructor.output.md index d0fb21a38..4064cbf3d 100644 --- a/unison-src/transcripts/update-type-add-constructor.output.md +++ b/unison-src/transcripts/update-type-add-constructor.output.md @@ -17,7 +17,7 @@ unique type Foo ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -45,18 +45,18 @@ unique type Foo ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view Foo +scratch/main> view Foo type Foo = Bar Nat | Baz Nat Nat -.> find.verbose +scratch/main> find.verbose 1. -- #2sffq4apsq1cts53njcunj63fa8ohov4eqn77q14s77ajicajh4g28sq5s5ai33f2k6oh6o67aarnlpu7u7s4la07ag2er33epalsog type Foo diff --git a/unison-src/transcripts/update-type-add-field.md b/unison-src/transcripts/update-type-add-field.md index 13a388e1b..cdd41c338 100644 --- a/unison-src/transcripts/update-type-add-field.md +++ b/unison-src/transcripts/update-type-add-field.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,7 +7,7 @@ unique type Foo = Bar Nat ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -15,7 +15,7 @@ unique type Foo = Bar Nat Nat ``` ```ucm -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-add-field.output.md b/unison-src/transcripts/update-type-add-field.output.md index 7ee979d64..6ba047164 100644 --- a/unison-src/transcripts/update-type-add-field.output.md +++ b/unison-src/transcripts/update-type-add-field.output.md @@ -16,7 +16,7 @@ unique type Foo = Bar Nat ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -42,18 +42,18 @@ unique type Foo = Bar Nat Nat ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view Foo +scratch/main> view Foo type Foo = Bar Nat Nat -.> find.verbose +scratch/main> find.verbose 1. -- #8fk6k0j208th1ia4vnjtoc5fomd6le540prec255svg71bcfga9dofrvoq1d7v6010d6b6em4q51p8st5c5juhrev72cnnel8ko3o1g type Foo diff --git a/unison-src/transcripts/update-type-add-new-record.md b/unison-src/transcripts/update-type-add-new-record.md index 0d311ec1e..a7f82df0c 100644 --- a/unison-src/transcripts/update-type-add-new-record.md +++ b/unison-src/transcripts/update-type-add-new-record.md @@ -1,5 +1,5 @@ ```ucm:hide -.lib> builtins.merge +scratch/main> builtins.merge lib.builtins ``` ```unison @@ -7,6 +7,6 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> update -.> view Foo +scratch/main> update +scratch/main> view Foo ``` diff --git a/unison-src/transcripts/update-type-add-new-record.output.md b/unison-src/transcripts/update-type-add-new-record.output.md index 8c00d6c1d..321ac28ec 100644 --- a/unison-src/transcripts/update-type-add-new-record.output.md +++ b/unison-src/transcripts/update-type-add-new-record.output.md @@ -19,14 +19,14 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view Foo +scratch/main> view Foo type Foo = { bar : Nat } diff --git a/unison-src/transcripts/update-type-add-record-field.md b/unison-src/transcripts/update-type-add-record-field.md index ef5aba361..d4edf079e 100644 --- a/unison-src/transcripts/update-type-add-record-field.md +++ b/unison-src/transcripts/update-type-add-record-field.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,7 +7,7 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -15,7 +15,7 @@ unique type Foo = { bar : Nat, baz : Int } ``` ```ucm -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-add-record-field.output.md b/unison-src/transcripts/update-type-add-record-field.output.md index 3f52ad6a8..d0a7a700e 100644 --- a/unison-src/transcripts/update-type-add-record-field.output.md +++ b/unison-src/transcripts/update-type-add-record-field.output.md @@ -19,7 +19,7 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -57,18 +57,18 @@ unique type Foo = { bar : Nat, baz : Int } ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view Foo +scratch/main> view Foo type Foo = { bar : Nat, baz : Int } -.> find.verbose +scratch/main> find.verbose 1. -- #05gh1dur4778dauh9slaofprc5356n47qpove0c1jl0birt2fcu301js8auu5vfr5bjfga9j8ikuk07ll9fu1gj3ehrp3basguhsd58 type Foo diff --git a/unison-src/transcripts/update-type-constructor-alias.md b/unison-src/transcripts/update-type-constructor-alias.md index 2d5f97ef2..50d55af06 100644 --- a/unison-src/transcripts/update-type-constructor-alias.md +++ b/unison-src/transcripts/update-type-constructor-alias.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,8 +7,8 @@ unique type Foo = Bar Nat ``` ```ucm -.> add -.> alias.term Foo.Bar Foo.BarAlias +scratch/main> add +scratch/main> alias.term Foo.Bar Foo.BarAlias ``` ```unison @@ -18,6 +18,6 @@ unique type Foo = Bar Nat Nat Bug: we leave `Foo.BarAlias` in the namespace with a nameless decl. ```ucm -.> update -.> find.verbose +scratch/main> update +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-constructor-alias.output.md b/unison-src/transcripts/update-type-constructor-alias.output.md index 44d683227..21cea73a9 100644 --- a/unison-src/transcripts/update-type-constructor-alias.output.md +++ b/unison-src/transcripts/update-type-constructor-alias.output.md @@ -16,13 +16,13 @@ unique type Foo = Bar Nat ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: type Foo -.> alias.term Foo.Bar Foo.BarAlias +scratch/main> alias.term Foo.Bar Foo.BarAlias Done. @@ -48,14 +48,14 @@ unique type Foo = Bar Nat Nat Bug: we leave `Foo.BarAlias` in the namespace with a nameless decl. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> find.verbose +scratch/main> find.verbose 1. -- #8fk6k0j208th1ia4vnjtoc5fomd6le540prec255svg71bcfga9dofrvoq1d7v6010d6b6em4q51p8st5c5juhrev72cnnel8ko3o1g type Foo diff --git a/unison-src/transcripts/update-type-delete-constructor-with-dependent.md b/unison-src/transcripts/update-type-delete-constructor-with-dependent.md index b44cf8a7a..3c7be50a5 100644 --- a/unison-src/transcripts/update-type-delete-constructor-with-dependent.md +++ b/unison-src/transcripts/update-type-delete-constructor-with-dependent.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -14,7 +14,7 @@ foo = cases ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -23,5 +23,5 @@ unique type Foo ``` ```ucm:error -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-delete-constructor-with-dependent.output.md b/unison-src/transcripts/update-type-delete-constructor-with-dependent.output.md index 9966a3241..f443c3426 100644 --- a/unison-src/transcripts/update-type-delete-constructor-with-dependent.output.md +++ b/unison-src/transcripts/update-type-delete-constructor-with-dependent.output.md @@ -24,7 +24,7 @@ foo = cases ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -52,7 +52,7 @@ unique type Foo ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-delete-constructor.md b/unison-src/transcripts/update-type-delete-constructor.md index cf348f690..18a8295d5 100644 --- a/unison-src/transcripts/update-type-delete-constructor.md +++ b/unison-src/transcripts/update-type-delete-constructor.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -9,7 +9,7 @@ unique type Foo ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -18,7 +18,7 @@ unique type Foo ``` ```ucm -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-delete-constructor.output.md b/unison-src/transcripts/update-type-delete-constructor.output.md index c417d5f15..1aa01c8a5 100644 --- a/unison-src/transcripts/update-type-delete-constructor.output.md +++ b/unison-src/transcripts/update-type-delete-constructor.output.md @@ -18,7 +18,7 @@ unique type Foo ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -45,18 +45,18 @@ unique type Foo ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view Foo +scratch/main> view Foo type Foo = Bar Nat -.> find.verbose +scratch/main> find.verbose 1. -- #b509v3eg4kehsg29g6pvrogeb71ue32nm2fj9284n4i7lprsr7u9a7g6s695d09du0fsfti6rrsk1s62q5thpr1jjkqb3us3s0lrd60 type Foo diff --git a/unison-src/transcripts/update-type-delete-record-field.md b/unison-src/transcripts/update-type-delete-record-field.md index de6396e0c..cd3520e8b 100644 --- a/unison-src/transcripts/update-type-delete-record-field.md +++ b/unison-src/transcripts/update-type-delete-record-field.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,7 +7,7 @@ unique type Foo = { bar : Nat, baz : Int } ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -17,7 +17,7 @@ unique type Foo = { bar : Nat } We want the field accessors to go away; but for now they are here, causing the update to fail. ```ucm:error -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-delete-record-field.output.md b/unison-src/transcripts/update-type-delete-record-field.output.md index a5b570d6d..e2691b814 100644 --- a/unison-src/transcripts/update-type-delete-record-field.output.md +++ b/unison-src/transcripts/update-type-delete-record-field.output.md @@ -22,7 +22,7 @@ unique type Foo = { bar : Nat, baz : Int } ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -59,7 +59,7 @@ unique type Foo = { bar : Nat } We want the field accessors to go away; but for now they are here, causing the update to fail. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -70,11 +70,11 @@ We want the field accessors to go away; but for now they are here, causing the u definitions that need fixing. Once the file is compiling, try `update` again. -.> view Foo +scratch/main> view Foo type Foo = { bar : Nat, baz : Int } -.> find.verbose +scratch/main> find.verbose 1. -- #05gh1dur4778dauh9slaofprc5356n47qpove0c1jl0birt2fcu301js8auu5vfr5bjfga9j8ikuk07ll9fu1gj3ehrp3basguhsd58 type Foo diff --git a/unison-src/transcripts/update-type-missing-constructor.md b/unison-src/transcripts/update-type-missing-constructor.md index bfaafa834..5fa29c2a8 100644 --- a/unison-src/transcripts/update-type-missing-constructor.md +++ b/unison-src/transcripts/update-type-missing-constructor.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,8 +7,8 @@ unique type Foo = Bar Nat ``` ```ucm -.> add -.> delete.term Foo.Bar +scratch/main> add +scratch/main> delete.term Foo.Bar ``` Now we've set up a situation where the original constructor missing. @@ -18,6 +18,6 @@ unique type Foo = Bar Nat Nat ``` ```ucm:error -.> view Foo -.> update +scratch/main> view Foo +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-missing-constructor.output.md b/unison-src/transcripts/update-type-missing-constructor.output.md index 52ead472e..59df270a5 100644 --- a/unison-src/transcripts/update-type-missing-constructor.output.md +++ b/unison-src/transcripts/update-type-missing-constructor.output.md @@ -16,13 +16,13 @@ unique type Foo = Bar Nat ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: type Foo -.> delete.term Foo.Bar +scratch/main> delete.term Foo.Bar Done. @@ -48,11 +48,11 @@ unique type Foo = Bar Nat Nat ``` ```ucm -.> view Foo +scratch/main> view Foo type Foo = #b509v3eg4k#0 Nat -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-nested-decl-aliases.md b/unison-src/transcripts/update-type-nested-decl-aliases.md index a51c9a2c1..03b20f6fd 100644 --- a/unison-src/transcripts/update-type-nested-decl-aliases.md +++ b/unison-src/transcripts/update-type-nested-decl-aliases.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -10,7 +10,7 @@ structural type A = B.TheOtherAlias Foo ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -22,5 +22,5 @@ only one name for each constructor. We instead get too far in the update process file to stare at. ```ucm:error -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-nested-decl-aliases.output.md b/unison-src/transcripts/update-type-nested-decl-aliases.output.md index 0b373c88c..afddbf3de 100644 --- a/unison-src/transcripts/update-type-nested-decl-aliases.output.md +++ b/unison-src/transcripts/update-type-nested-decl-aliases.output.md @@ -21,7 +21,7 @@ structural type A = B.TheOtherAlias Foo ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -53,7 +53,7 @@ only one name for each constructor. We instead get too far in the update process file to stare at. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-no-op-record.md b/unison-src/transcripts/update-type-no-op-record.md index 50a559819..e9ec904c9 100644 --- a/unison-src/transcripts/update-type-no-op-record.md +++ b/unison-src/transcripts/update-type-no-op-record.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,11 +7,11 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> add +scratch/main> add ``` Bug: this no-op update should (of course) succeed. ```ucm -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-no-op-record.output.md b/unison-src/transcripts/update-type-no-op-record.output.md index 1a7e55eb7..8d46e420c 100644 --- a/unison-src/transcripts/update-type-no-op-record.output.md +++ b/unison-src/transcripts/update-type-no-op-record.output.md @@ -19,7 +19,7 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -32,7 +32,7 @@ unique type Foo = { bar : Nat } Bug: this no-op update should (of course) succeed. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-stray-constructor-alias.md b/unison-src/transcripts/update-type-stray-constructor-alias.md index 847a37e32..8bd4ba362 100644 --- a/unison-src/transcripts/update-type-stray-constructor-alias.md +++ b/unison-src/transcripts/update-type-stray-constructor-alias.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,8 +7,8 @@ unique type Foo = Bar Nat ``` ```ucm -.> add -.> alias.term Foo.Bar Stray.BarAlias +scratch/main> add +scratch/main> alias.term Foo.Bar Stray.BarAlias ``` ```unison @@ -18,6 +18,6 @@ unique type Foo = Bar Nat Nat Bug: we leave `Stray.BarAlias` in the namespace with a nameless decl. ```ucm -.> update -.> find.verbose +scratch/main> update +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-stray-constructor-alias.output.md b/unison-src/transcripts/update-type-stray-constructor-alias.output.md index e9fe5f966..0e906b70d 100644 --- a/unison-src/transcripts/update-type-stray-constructor-alias.output.md +++ b/unison-src/transcripts/update-type-stray-constructor-alias.output.md @@ -16,13 +16,13 @@ unique type Foo = Bar Nat ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: type Foo -.> alias.term Foo.Bar Stray.BarAlias +scratch/main> alias.term Foo.Bar Stray.BarAlias Done. @@ -48,14 +48,14 @@ unique type Foo = Bar Nat Nat Bug: we leave `Stray.BarAlias` in the namespace with a nameless decl. ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> find.verbose +scratch/main> find.verbose 1. -- #8fk6k0j208th1ia4vnjtoc5fomd6le540prec255svg71bcfga9dofrvoq1d7v6010d6b6em4q51p8st5c5juhrev72cnnel8ko3o1g type Foo diff --git a/unison-src/transcripts/update-type-stray-constructor.md b/unison-src/transcripts/update-type-stray-constructor.md index 183818e56..7808f759b 100644 --- a/unison-src/transcripts/update-type-stray-constructor.md +++ b/unison-src/transcripts/update-type-stray-constructor.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,8 +7,8 @@ unique type Foo = Bar Nat ``` ```ucm -.> add -.> move.term Foo.Bar Stray.Bar +scratch/main> add +scratch/main> move.term Foo.Bar Stray.Bar ``` Now we've set up a situation where the constructor is not where it's supposed to be; it's somewhere else. @@ -20,6 +20,6 @@ unique type Foo = Bar Nat Nat Note that the constructor name shown here (implied to be called `Foo.Stray.Bar`) doesn't really exist, it's just showing up due to a pretty-printer bug. ```ucm:error -.> view Foo -.> update +scratch/main> view Foo +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-stray-constructor.output.md b/unison-src/transcripts/update-type-stray-constructor.output.md index 8f72beefd..a76b034b4 100644 --- a/unison-src/transcripts/update-type-stray-constructor.output.md +++ b/unison-src/transcripts/update-type-stray-constructor.output.md @@ -16,13 +16,13 @@ unique type Foo = Bar Nat ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: type Foo -.> move.term Foo.Bar Stray.Bar +scratch/main> move.term Foo.Bar Stray.Bar Done. @@ -50,11 +50,11 @@ unique type Foo = Bar Nat Nat Note that the constructor name shown here (implied to be called `Foo.Stray.Bar`) doesn't really exist, it's just showing up due to a pretty-printer bug. ```ucm -.> view Foo +scratch/main> view Foo type Foo = Stray.Bar Nat -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.md b/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.md index 1debc0aaf..1f2933242 100644 --- a/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.md +++ b/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -10,7 +10,7 @@ makeFoo n = Bar (n+10) ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -21,7 +21,7 @@ Foo.Bar n = internal.Bar n ``` ```ucm -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.output.md b/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.output.md index a28e27e74..a00b5dde6 100644 --- a/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.output.md +++ b/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.output.md @@ -20,7 +20,7 @@ makeFoo n = Bar (n+10) ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -51,7 +51,7 @@ Foo.Bar n = internal.Bar n ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -62,11 +62,11 @@ Foo.Bar n = internal.Bar n Done. -.> view Foo +scratch/main> view Foo type Foo = internal.Bar Nat -.> find.verbose +scratch/main> find.verbose 1. -- #b509v3eg4kehsg29g6pvrogeb71ue32nm2fj9284n4i7lprsr7u9a7g6s695d09du0fsfti6rrsk1s62q5thpr1jjkqb3us3s0lrd60 type Foo diff --git a/unison-src/transcripts/update-type-turn-non-record-into-record.md b/unison-src/transcripts/update-type-turn-non-record-into-record.md index b570aa5f7..829240ff6 100644 --- a/unison-src/transcripts/update-type-turn-non-record-into-record.md +++ b/unison-src/transcripts/update-type-turn-non-record-into-record.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -7,7 +7,7 @@ unique type Foo = Nat ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -15,7 +15,7 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> update -.> view Foo -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-turn-non-record-into-record.output.md b/unison-src/transcripts/update-type-turn-non-record-into-record.output.md index f23ab09cd..fb1f2dd2c 100644 --- a/unison-src/transcripts/update-type-turn-non-record-into-record.output.md +++ b/unison-src/transcripts/update-type-turn-non-record-into-record.output.md @@ -16,7 +16,7 @@ unique type Foo = Nat ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -48,18 +48,18 @@ unique type Foo = { bar : Nat } ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... Done. -.> view Foo +scratch/main> view Foo type Foo = { bar : Nat } -.> find.verbose +scratch/main> find.verbose 1. -- #b509v3eg4kehsg29g6pvrogeb71ue32nm2fj9284n4i7lprsr7u9a7g6s695d09du0fsfti6rrsk1s62q5thpr1jjkqb3us3s0lrd60 type Foo diff --git a/unison-src/transcripts/update-type-with-dependent-term.md b/unison-src/transcripts/update-type-with-dependent-term.md index 99bfcceac..300eddc69 100644 --- a/unison-src/transcripts/update-type-with-dependent-term.md +++ b/unison-src/transcripts/update-type-with-dependent-term.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -10,7 +10,7 @@ incrFoo = cases Bar n -> Bar (n+1) ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -18,5 +18,5 @@ unique type Foo = Bar Nat Nat ``` ```ucm:error -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-with-dependent-term.output.md b/unison-src/transcripts/update-type-with-dependent-term.output.md index e8837eb52..1ab2b586b 100644 --- a/unison-src/transcripts/update-type-with-dependent-term.output.md +++ b/unison-src/transcripts/update-type-with-dependent-term.output.md @@ -20,7 +20,7 @@ incrFoo = cases Bar n -> Bar (n+1) ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -47,7 +47,7 @@ unique type Foo = Bar Nat Nat ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.md b/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.md index 7c5a5018b..1caef319d 100644 --- a/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.md +++ b/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -8,7 +8,7 @@ unique type Baz = Qux Foo ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -16,5 +16,5 @@ unique type Foo a = Bar Nat a ``` ```ucm:error -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.output.md b/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.output.md index e105b39ea..edc63c214 100644 --- a/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.output.md +++ b/unison-src/transcripts/update-type-with-dependent-type-to-different-kind.output.md @@ -18,7 +18,7 @@ unique type Baz = Qux Foo ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -45,7 +45,7 @@ unique type Foo a = Bar Nat a ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/update-type-with-dependent-type.md b/unison-src/transcripts/update-type-with-dependent-type.md index 7dea36732..4b6e8aa2d 100644 --- a/unison-src/transcripts/update-type-with-dependent-type.md +++ b/unison-src/transcripts/update-type-with-dependent-type.md @@ -1,5 +1,5 @@ ```ucm:hide -.> builtins.merge lib.builtin +scratch/main> builtins.merge lib.builtin ``` ```unison @@ -8,7 +8,7 @@ unique type Baz = Qux Foo ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -16,8 +16,8 @@ unique type Foo = Bar Nat Nat ``` ```ucm -.> update -.> view Foo -.> view Baz -.> find.verbose +scratch/main> update +scratch/main> view Foo +scratch/main> view Baz +scratch/main> find.verbose ``` diff --git a/unison-src/transcripts/update-type-with-dependent-type.output.md b/unison-src/transcripts/update-type-with-dependent-type.output.md index 47988e1ff..2523eed7d 100644 --- a/unison-src/transcripts/update-type-with-dependent-type.output.md +++ b/unison-src/transcripts/update-type-with-dependent-type.output.md @@ -18,7 +18,7 @@ unique type Baz = Qux Foo ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -45,7 +45,7 @@ unique type Foo = Bar Nat Nat ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... @@ -56,15 +56,15 @@ unique type Foo = Bar Nat Nat Done. -.> view Foo +scratch/main> view Foo type Foo = Bar Nat Nat -.> view Baz +scratch/main> view Baz type Baz = Qux Foo -.> find.verbose +scratch/main> find.verbose 1. -- #34msh9satlfog576493eo9pkjn6aj7d8fj6jfheglvgr5s39iptb81649bpkad1lqraheqb8em9ms551k01oternhknc4m7jicgtk08 type Baz diff --git a/unison-src/transcripts/update-watch.md b/unison-src/transcripts/update-watch.md index 6637515ff..013801ebb 100644 --- a/unison-src/transcripts/update-watch.md +++ b/unison-src/transcripts/update-watch.md @@ -3,5 +3,5 @@ ``` ```ucm -.> update +scratch/main> update ``` diff --git a/unison-src/transcripts/update-watch.output.md b/unison-src/transcripts/update-watch.output.md index e97d32f9e..c9c951045 100644 --- a/unison-src/transcripts/update-watch.output.md +++ b/unison-src/transcripts/update-watch.output.md @@ -19,7 +19,7 @@ ``` ```ucm -.> update +scratch/main> update Okay, I'm searching the branch for code that needs to be updated... diff --git a/unison-src/transcripts/watch-expressions.md b/unison-src/transcripts/watch-expressions.md index e17d789a5..b4f54004b 100644 --- a/unison-src/transcripts/watch-expressions.md +++ b/unison-src/transcripts/watch-expressions.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.mergeio +scratch/main> builtins.mergeio ``` ```unison @@ -7,7 +7,7 @@ test> pass = [Ok "Passed"] ``` ```ucm -.> add +scratch/main> add ``` ```unison @@ -15,8 +15,8 @@ test> pass = [Ok "Passed"] ``` ```ucm -.> add -.> test +scratch/main> add +scratch/main> test ``` ```unison diff --git a/unison-src/transcripts/watch-expressions.output.md b/unison-src/transcripts/watch-expressions.output.md index 1d7097895..589b70833 100644 --- a/unison-src/transcripts/watch-expressions.output.md +++ b/unison-src/transcripts/watch-expressions.output.md @@ -1,5 +1,5 @@ ```ucm -.> builtins.mergeio +scratch/main> builtins.mergeio Done. @@ -29,7 +29,7 @@ test> pass = [Ok "Passed"] ``` ```ucm -.> add +scratch/main> add ⍟ I've added these definitions: @@ -56,11 +56,11 @@ test> pass = [Ok "Passed"] ``` ```ucm -.> add +scratch/main> add ⊡ Ignored previously added definitions: pass -.> test +scratch/main> test Cached test results (`help testcache` to learn more)