Commit graph

25 commits

Author SHA256 Message Date
1e7c54fcc6 Code actions for typed holes and incomplete matches
The language server can fill a hole with what fits it and add the
clauses a match lacks; the sections on typed holes and exhaustiveness
say so.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 20:35:00 +02:00
c791af1593 Unused definitions
A subsection after typed holes: the compiler warns about a definition
nothing uses, and a leading _ keeps one on purpose.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 15:06:15 +02:00
2a4e3b3fcf Typed holes
A subsection under Values, types and signatures: _ where the code is not
written yet, what the compiler says about it, and a _name as a named hole.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 12:37:40 +02:00
ae58a1e004 Newtypes: phantom type parameters
One Id with a tag for what it is an id of, in place of a newtype per kind
of id, and a tag that records what has been checked about a value, kept
honest by #:opaque.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 11:47:12 +02:00
1a407720a9 Unions: two may have a case of one name; which name wins, as it is
A case of one name in two unions is chosen by type, then by scope, and
the manual says so in place of "cannot both have a case called Red".
Writing programs said two imports offering one name, a type among them,
resolved to the later import; a use is refused until the program says
which, except for cases of different unions.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 11:27:57 +02:00
5a9f65accf Traits and fmt brought up to the compiler of 21 October
- Where an implementation is written: with its trait or its type, a
  newtype for anything else, and traits, types and impls usable above
  where they are written.
- One implementation that fits decides the type of a call.
- A function is written as #<procedure> wherever it is; Procedure.
- A (dyn T) implements the traits T requires.
- Formatting: the lambda that returns a vec of mixed pieces, in the
  table of errors; the short fmt tour in Language basics in the style of
  a string being a block.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 07:59:36 +02:00
25720e4fb2 Traits: write the rules' itemlist with a brace body
@itemlist[...] gave the items as arguments, which samizdat reads as
bjodat, and the comma in the prose stopped it.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-22 07:15:28 +02:00
e448ee0d93 Printing: written and displayed
->str gives way to two traits, as Scheme's write and display: a value
as the reader reads it, and the value for a person. Every type of your
own is written in constructor syntax. The examples, the REPL session and
the expect output follow.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-21 15:38:01 +02:00
481538a1cb Numbers: the full set of types, and real literals that take their type
The numeric types table lists bigint, int128, uint128, float and decimal.
A real literal without a suffix is a double, float or decimal as the
context says. A boolean prints as #t.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-21 13:05:45 +02:00
bd71102c19 Newtypes, and giving one the traits of the type it wraps
A newtype beside aliases in "Your own types", and #:via and type/derive
for one in the traits chapter.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-21 08:25:02 +02:00
6d9c9bf8a0 Traits: traits that require other traits
A trait may require another of every implementor, with a where clause
in the trait. The section shows a function that asks for one trait and
uses the other, and notes that Ord now requires Eq.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-21 06:33:00 +02:00
8729cb3ef7 Traits: implementations for particular type arguments
One type may have an implementation at (List int) and another at
(List string). The section says how the compiler picks one, and that
overlapping implementations and calls at a type it cannot decide are
errors.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-20 22:15:21 +02:00
84000bf384 A main that does not return an int exits with 0
The first program no longer ends in a 0, and the appendix says what the
compiler knows about main. The unit type is spelled void in the
signatures that wrote unit, which is its value, and print-n-times has a
loop clause for its body.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-20 13:24:25 +02:00
a4c27bbf7c Comparison patterns, and decimal and bigint literals
Part I's pattern matching chapter gets a section on (:at-least lo),
(:at-most hi), (:between lo hi), (:greater-than lo) and (:less-than hi):
what each matches, that they nest like any pattern, that the bounds are
literals, and that the ranges of integers and characters are added up
by the exhaustiveness check while those of doubles are not. The section
on exhaustiveness shows a counterexample in a gap between ranges.

The table of literals lists decimal and bigint, and the comment in the
inference example says which binding is pinned.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-13 10:00:18 +02:00
8ca519a8ed fixed example 2026-10-09 14:38:08 +02:00
7ed3b382ee Part I no longer has its own section on editor support
It said less than Appendix D does, and some of it was no longer true:
Appendix D covers bjomode.el and samizdat-mode.el.

🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-08 21:28:10 +02:00
5924aa27bc Slices, string-search, and trimming left and right
🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-05 09:44:37 +02:00
16278c2c92 substring, after Bjolang's rename of substring/cursors
🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-05 09:02:15 +02:00
1ef2489224 Strings are UTF-8, and System.String is converted at a .NET call
🤖 Generated with [ECA](https://eca.dev)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-04 22:20:16 +02:00
ea96af593c try-get on a Vec out of range is None; OrderedMap takes set and update 2026-10-04 14:13:51 +02:00
48771a225a Paths, .field, hoisting, and (std hashset)
- (.field value), and get, try-get, set and update for reading and copying
  along a path of fields and keys, with ref-set in the generic operations.
- please-hoist-i-promise-i-am-not-naughty, in the macros section.
- (std set) is (std hashset), and the collector is hash-setting.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-4-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-03 15:03:56 +02:00
1fe22a4dfd Loops: :finish, :abandon, :while, :until and the :subloop form
The clause table, stopping early and nesting use the new names, and
count-lines uses :until instead of a counter that only drove the loop.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-02 22:01:47 +02:00
d35a116b8a Getting started says where Bjolang is: the repository, built from source
There are no releases, so the section now says so, and gives the clone and
the build in the order Compiling.org has them: the runtime, the compiler,
the standard library. Updating is a pull and bjo rebjo. The editor support
paragraph links the repository it mentions.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-01 21:23:38 +02:00
27c7d64641 The manual as a site: a landing page, the chapters, and a page per module
index.sz is a landing page pointing to the manual, now manual.sz, and to
modules/, where each library module has a page made by @generate-docs from
the docs it was compiled with. The chapters gain appendices, and part III
links each module to its page. glasnost's page cache is ignored.

🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-5-5)

Co-Authored-By: eca-agent <git@eca.dev>
2026-10-01 18:37:22 +02:00
e54bd31d69 first commit 2026-10-01 11:36:18 +02:00