Skip to content

Commit 40e1b7b

Browse files
authored
glossary: builtin (#7810)
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
1 parent a0bcfb0 commit 40e1b7b

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Glossary.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,16 @@ Parsing of type vars:
182182

183183
## Builtin
184184

185-
TODO
185+
A function or type that is natively provided by Roc, for example `Dict.empty`, `List.map`, `Result`, ... .
186+
You don't need to import any of these to use them.
187+
188+
[Builtin Docs](https://www.roc-lang.org/builtins)
189+
190+
Implementation of builtins:
191+
- new compiler: [src/builtins](src/builtins) (work in progress)
192+
- old compiler: [crates/compiler/builtins](crates/compiler/builtins). Note: some builtin functions are implemented in zig, like `Num.f64_to_bits`, see [num.zig](crates/compiler/builtins/bitcode/src/num.zig).
193+
194+
Interesting fact: our builtins are integrated into the compiler, there is no typical separate standard library.
186195

187196
## Compiler Phase
188197

0 commit comments

Comments
 (0)