diff --git a/_03.Standard-library.sz b/_03.Standard-library.sz index 1afef2a..1fc3bdd 100644 --- a/_03.Standard-library.sz +++ b/_03.Standard-library.sz @@ -1,4 +1,4 @@ -@section{Part III — The standard library} +@section{The standard library} A short tour of the standard library. Each module's full reference is its own page under @link["modules/index.html"]{Modules}. diff --git a/_04.Appendices.sz b/_04.Appendices.sz index d4c38e7..68985b0 100644 --- a/_04.Appendices.sz +++ b/_04.Appendices.sz @@ -1,6 +1,6 @@ @section{Appendices} -@subsection{Appendix A — Coming from Scheme or ML} +@subsection{Coming from Scheme or ML} Bjolang sits at the crossroads of two major functional programming lineages. From the Scheme and Lisp tradition, it draws its uniform S-expression syntax, prefix notation, code-as-data perspective, and hygienic macro system. From the ML family—specifically OCaml and F#—it inherits static Hindley-Milner type inference, algebraic data types, compile-time exhaustiveness checking, traits, and high-performance immutable data structures. @@ -50,7 +50,7 @@ The main shifts you will encounter coming from ML are: - Automatic colour twins: In many typed asynchronous languages, asynchronous functions have distinct types (@code{Task<'T>} or @code{Async<'T>}) that cannot be passed to standard higher-order functions like @code{List.map} without creating asynchronous duplicates (@code{List.mapAsync}). Bjolang solves this "function colouring problem" at the compiler level: higher-order functions declaring @code{-?->} parameters automatically generate both synchronous and suspending twins, allowing the exact same @code{list-map} to be used whether your callback performs I/O or pure computation. } -@subsection{Appendix B — Reading compiler errors} +@subsection{Reading compiler errors} Bjolang's frontend is designed to catch structural, typing, and concurrency errors early, providing descriptive diagnostics that point directly to the source of the problem before code reaches the C# compiler. Below are some of the most common compiler messages you will encounter, what causes them, and how to resolve them. @@ -246,7 +246,7 @@ When compiled, the macro expander reports: (def/thunk answer 42) }| -@subsection{Appendix C — How it compiles} +@subsection{How it compiles} Bjolang targets the .NET 10 CLR by compiling to readable, high-performance C# 12 code, which is then compiled into managed assemblies by the Roslyn compiler. Rather than running an interpreter or emitting raw IL bytes, compiling through C# allows Bjolang to leverage RyuJIT's advanced optimization pipeline, benefit from modern runtime features like value types and spans, and interoperate seamlessly with the broader .NET ecosystem. @@ -363,7 +363,7 @@ When you run @code{bjo run game.bjo} again: You can pass @code{-c} to force an unconditional rebuild, or @code{-d} to create an unoptimized debug build with AST and generated C# dumps. -@subsection{Appendix D — Editor support} +@subsection{Editor support} Editing Bjolang code is most pleasant in Emacs, where specialized major modes support both Bjolang source files and Samizdat documentation. diff --git a/manual.sz b/manual.sz index 3defc83..5ea844e 100644 --- a/manual.sz +++ b/manual.sz @@ -1,13 +1,10 @@ (meta (title "The Bjolang manual") (date "2026-09-29")) +@numbered-headings @toc[#:depth 3] @include["_01.Language-basics.sz"] @include["_02_.Writing-programs.sz"] @include["_03.Standard-library.sz"] @include["_04.Appendices.sz"] - -@subsection{std/random} - -@defmodule[(std random)]