2020-02-13 18:59:53 +03:00
|
|
|
# The empty codebase
|
|
|
|
|
|
|
|
The Unison codebase, when first initialized, contains no definitions in its namespace.
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
Not even `Nat` or `+`\!
|
2020-02-13 18:59:53 +03:00
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
BEHOLD\!\!\!
|
2020-02-13 18:59:53 +03:00
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> ls
|
2020-02-13 18:59:53 +03:00
|
|
|
|
|
|
|
nothing to show
|
|
|
|
|
|
|
|
```
|
|
|
|
Technically, the definitions all exist, but they have no names. `builtins.merge` brings them into existence, under the current namespace:
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 21:01:11 +03:00
|
|
|
scratch/main> builtins.merge lib.builtins
|
2020-02-13 18:59:53 +03:00
|
|
|
|
|
|
|
Done.
|
|
|
|
|
2024-06-26 21:01:11 +03:00
|
|
|
scratch/main> ls lib
|
2020-02-13 18:59:53 +03:00
|
|
|
|
2024-06-26 21:01:11 +03:00
|
|
|
1. builtins/ (469 terms, 74 types)
|
2020-02-13 18:59:53 +03:00
|
|
|
|
2020-04-10 00:52:04 +03:00
|
|
|
```
|
|
|
|
And for a limited time, you can get even more builtin goodies:
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-26 21:01:11 +03:00
|
|
|
scratch/main> builtins.mergeio lib.builtinsio
|
2020-04-10 00:52:04 +03:00
|
|
|
|
|
|
|
Done.
|
|
|
|
|
2024-06-26 21:01:11 +03:00
|
|
|
scratch/main> ls lib
|
2020-02-13 18:59:53 +03:00
|
|
|
|
2024-06-26 21:01:11 +03:00
|
|
|
1. builtins/ (469 terms, 74 types)
|
|
|
|
2. builtinsio/ (643 terms, 92 types)
|
2020-02-13 18:59:53 +03:00
|
|
|
|
|
|
|
```
|
2024-07-10 17:46:18 +03:00
|
|
|
More typically, you'd start out by pulling `base`.
|
|
|
|
|