2024-07-05 18:33:11 +03:00
|
|
|
|
# demonstrating our new input parsing errors
|
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
|
``` unison
|
2024-07-05 18:33:11 +03:00
|
|
|
|
x = 55
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
`handleNameArg` parse error in `add`
|
2024-07-10 17:46:18 +03:00
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
|
``` ucm
|
2024-07-05 18:33:11 +03:00
|
|
|
|
scratch/main> add .
|
|
|
|
|
|
2024-07-05 19:54:35 +03:00
|
|
|
|
⚠️
|
|
|
|
|
|
2024-07-05 22:10:28 +03:00
|
|
|
|
Sorry, I wasn’t sure how to process your request:
|
2024-07-05 19:54:35 +03:00
|
|
|
|
|
|
|
|
|
1:2:
|
|
|
|
|
|
|
|
|
|
|
1 | .
|
|
|
|
|
| ^
|
|
|
|
|
unexpected end of input
|
|
|
|
|
expecting '`' or operator (valid characters: !$%&*+-/:<=>\^|~)
|
2024-07-05 18:33:11 +03:00
|
|
|
|
|
2024-07-05 19:54:35 +03:00
|
|
|
|
|
|
|
|
|
You can run `help add` for more information on using `add`.
|
2024-07-05 18:33:11 +03:00
|
|
|
|
|
|
|
|
|
scratch/main> ls
|
|
|
|
|
|
|
|
|
|
1. lib/ (469 terms, 74 types)
|
|
|
|
|
2. x (Nat)
|
|
|
|
|
|
|
|
|
|
scratch/main> add 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scratch/main> ls
|
|
|
|
|
|
|
|
|
|
1. lib/ (469 terms, 74 types)
|
|
|
|
|
2. x (Nat)
|
|
|
|
|
|
|
|
|
|
scratch/main> add 2
|
|
|
|
|
|
|
|
|
|
⊡ Ignored previously added definitions: x
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
todo:
|
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
|
``` haskell
|
2024-07-05 18:33:11 +03:00
|
|
|
|
SA.Name name -> pure name
|
|
|
|
|
SA.NameWithBranchPrefix (Left _) name -> pure name
|
|
|
|
|
SA.NameWithBranchPrefix (Right prefix) name -> pure $ Path.prefixNameIfRel (Path.AbsolutePath' prefix) name
|
|
|
|
|
SA.HashQualified hqname -> maybe (Left "can’t find a name from the numbered arg") pure $ HQ.toName hqname
|
|
|
|
|
SA.HashQualifiedWithBranchPrefix (Left _) hqname -> pure $ HQ'.toName hqname
|
|
|
|
|
SA.HashQualifiedWithBranchPrefix (Right prefix) hqname ->
|
|
|
|
|
pure . Path.prefixNameIfRel (Path.AbsolutePath' prefix) $ HQ'.toName hqname
|
|
|
|
|
SA.ShallowListEntry prefix entry ->
|
|
|
|
|
pure . HQ'.toName . fmap (Path.prefixNameIfRel prefix) $ shallowListEntryToHQ' entry
|
|
|
|
|
SA.SearchResult mpath result ->
|
|
|
|
|
maybe (Left "can’t find a name from the numbered arg") pure . HQ.toName $ searchResultToHQ mpath result
|
|
|
|
|
otherNumArg -> Left . I.Formatted $ wrongStructuredArgument "a name" otherNumArg
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
aliasMany: skipped -- similar to `add`
|
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
|
``` ucm
|
2024-07-05 18:33:11 +03:00
|
|
|
|
scratch/main> update arg
|
|
|
|
|
|
2024-07-05 19:54:35 +03:00
|
|
|
|
⚠️
|
|
|
|
|
|
2024-07-05 22:10:28 +03:00
|
|
|
|
Sorry, I wasn’t sure how to process your request:
|
2024-07-05 19:54:35 +03:00
|
|
|
|
|
2024-07-06 21:37:55 +03:00
|
|
|
|
I expected no arguments, but received one.
|
2024-07-05 19:54:35 +03:00
|
|
|
|
|
|
|
|
|
You can run `help update` for more information on using
|
|
|
|
|
`update`.
|
2024-07-05 18:33:11 +03:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
aliasTerm
|
|
|
|
|
|
2024-07-15 21:10:27 +03:00
|
|
|
|
```
|
|
|
|
|
scratch/main> alias.term ##Nat.+ Nat.+
|
|
|
|
|
```
|
2024-07-05 18:33:11 +03:00
|
|
|
|
|
|
|
|
|
aliasTermForce,
|
|
|
|
|
aliasType,
|
|
|
|
|
|
|
|
|
|
todo:
|
2024-07-10 17:46:18 +03:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
aliasMany,
|
2024-07-05 18:33:11 +03:00
|
|
|
|
api,
|
|
|
|
|
authLogin,
|
|
|
|
|
back,
|
|
|
|
|
branchEmptyInputPattern,
|
|
|
|
|
branchInputPattern,
|
|
|
|
|
branchRenameInputPattern,
|
|
|
|
|
branchesInputPattern,
|
|
|
|
|
cd,
|
|
|
|
|
clear,
|
|
|
|
|
clone,
|
|
|
|
|
compileScheme,
|
|
|
|
|
createAuthor,
|
|
|
|
|
debugClearWatchCache,
|
|
|
|
|
debugDoctor,
|
|
|
|
|
debugDumpNamespace,
|
|
|
|
|
debugDumpNamespaceSimple,
|
|
|
|
|
debugTerm,
|
|
|
|
|
debugTermVerbose,
|
|
|
|
|
debugType,
|
|
|
|
|
debugLSPFoldRanges,
|
|
|
|
|
debugFileHashes,
|
|
|
|
|
debugNameDiff,
|
|
|
|
|
debugNumberedArgs,
|
|
|
|
|
debugTabCompletion,
|
|
|
|
|
debugFuzzyOptions,
|
|
|
|
|
debugFormat,
|
|
|
|
|
delete,
|
|
|
|
|
deleteBranch,
|
|
|
|
|
deleteProject,
|
|
|
|
|
deleteNamespace,
|
|
|
|
|
deleteNamespaceForce,
|
|
|
|
|
deleteTerm,
|
|
|
|
|
deleteTermVerbose,
|
|
|
|
|
deleteType,
|
|
|
|
|
deleteTypeVerbose,
|
|
|
|
|
deleteVerbose,
|
|
|
|
|
dependencies,
|
|
|
|
|
dependents,
|
|
|
|
|
diffNamespace,
|
|
|
|
|
display,
|
|
|
|
|
displayTo,
|
|
|
|
|
docToMarkdown,
|
|
|
|
|
docs,
|
|
|
|
|
docsToHtml,
|
|
|
|
|
edit,
|
|
|
|
|
editNamespace,
|
|
|
|
|
execute,
|
|
|
|
|
find,
|
|
|
|
|
findIn,
|
|
|
|
|
findAll,
|
|
|
|
|
findInAll,
|
|
|
|
|
findGlobal,
|
|
|
|
|
findShallow,
|
|
|
|
|
findVerbose,
|
|
|
|
|
findVerboseAll,
|
|
|
|
|
sfind,
|
|
|
|
|
sfindReplace,
|
|
|
|
|
forkLocal,
|
|
|
|
|
help,
|
|
|
|
|
helpTopics,
|
|
|
|
|
history,
|
|
|
|
|
ioTest,
|
|
|
|
|
ioTestAll,
|
|
|
|
|
libInstallInputPattern,
|
|
|
|
|
load,
|
|
|
|
|
makeStandalone,
|
|
|
|
|
mergeBuiltins,
|
|
|
|
|
mergeIOBuiltins,
|
|
|
|
|
mergeOldInputPattern,
|
|
|
|
|
mergeOldPreviewInputPattern,
|
|
|
|
|
mergeOldSquashInputPattern,
|
|
|
|
|
mergeInputPattern,
|
|
|
|
|
mergeCommitInputPattern,
|
|
|
|
|
names False, -- names
|
|
|
|
|
names True, -- names.global
|
|
|
|
|
namespaceDependencies,
|
|
|
|
|
previewAdd,
|
|
|
|
|
previewUpdate,
|
|
|
|
|
printVersion,
|
|
|
|
|
projectCreate,
|
|
|
|
|
projectCreateEmptyInputPattern,
|
|
|
|
|
projectRenameInputPattern,
|
|
|
|
|
projectSwitch,
|
|
|
|
|
projectsInputPattern,
|
|
|
|
|
pull,
|
|
|
|
|
pullWithoutHistory,
|
|
|
|
|
push,
|
|
|
|
|
pushCreate,
|
|
|
|
|
pushExhaustive,
|
|
|
|
|
pushForce,
|
|
|
|
|
quit,
|
|
|
|
|
releaseDraft,
|
|
|
|
|
renameBranch,
|
|
|
|
|
renameTerm,
|
|
|
|
|
renameType,
|
|
|
|
|
moveAll,
|
|
|
|
|
reset,
|
|
|
|
|
resetRoot,
|
|
|
|
|
runScheme,
|
|
|
|
|
saveExecuteResult,
|
|
|
|
|
test,
|
|
|
|
|
testAll,
|
|
|
|
|
todo,
|
|
|
|
|
ui,
|
|
|
|
|
undo,
|
|
|
|
|
up,
|
|
|
|
|
update,
|
|
|
|
|
updateBuiltins,
|
|
|
|
|
updateOld,
|
|
|
|
|
updateOldNoPatch,
|
|
|
|
|
upgrade,
|
|
|
|
|
upgradeCommitInputPattern,
|
|
|
|
|
view,
|
|
|
|
|
viewGlobal,
|
|
|
|
|
viewReflog
|
|
|
|
|
```
|
|
|
|
|
|