87 Commits

Author SHA1 Message Date
1a97dfff77 A .fln file writes a condition's parent as struct DiskFull :parent IoError, a macro as macro repeat(i, n, & body) and a loop as loop x = a, y = b, and flan convert prints them so. 2026-09-26 05:39:59 +07:00
34ef99d1f2 A block lambda in code cut mid-line reads against its line's start, an arm or else value ending in => takes its block, and a missing comma between indices shows the indexed spelling 2026-09-26 05:37:22 +07:00
3c962197f4 A .fln lambda's body follows =>, and a lambda's block may sit inside a call's brackets as its last argument 2026-09-26 05:17:31 +07:00
6c32383539 Typed lambdas bind a generic's CFn variables, a local shadows an enum of its name, the lambda-in-brackets fix is the typed let that compiles, an else deeper than a one-line if or after else-if is refused by name, a block if takes a one-line else, and messages spell every type in the code's syntax 2026-09-26 00:36:21 +07:00
fff1c0b9c3 Merge master: return-type inference beside the syntax-following type spellings 2026-09-26 00:27:59 +07:00
fd1a7f2b36 A one-line if takes its else on the next line, lambdas state their types, a restart's report sits on its header, Dir.north names an enum member, messages spell types in the code's syntax, adjacent globals convert adjacent, and a bad map key is one error 2026-09-26 00:07:28 +07:00
dbddc61b30 defvar in a .fln file suggests once and def in its spelling, and x++ on a global suggests ++(x) 2026-09-25 23:48:59 +07:00
dca29a5605 A .fln file's common mistakes are answered in .fln terms, a bare () in a body slot does nothing, and the syntax gaps found writing by hand are listed in TODO.org 2026-09-25 23:44:04 +07:00
7e48f1eaf5 Eight hand-written .fln programs run the same on both backends and through a conversion to parens and back 2026-09-25 23:34:16 +07:00
2135f6d37f Merge branch 'master' into worktree-agent-a46233a32d1912c78 2026-09-25 23:27:55 +07:00
0e26af2107 A macro body counts as run in order only when nothing outside its templates depends on how the body splits into arguments, a let whose longer scope would reach a macro naming it stays in a do: block, and converted programs with shadowed names and macro bodies print what their paren originals print 2026-09-25 23:00:27 +07:00
e18b28be3e Master is merged into the flat-let lane 2026-09-25 22:49:39 +07:00
319a3c78c4 Merge branch 'master' into worktree-agent-a46233a32d1912c78 2026-09-25 22:40:48 +07:00
55ab1a98ae A macro whose definition splices its body into a do, and comment, count as bodies run in order where the .fln printer writes a let flat, and a struct-pattern let renames and flattens like a plain one 2026-09-25 22:39:50 +07:00
35aa5a8c0f A refused dyn view of a global names its own defining form as the fix, and every dyn fix is spelled in the syntax the code was written in 2026-09-25 22:27:36 +07:00
0b80c1956f A let in .fln is always flat and a line indented under one is refused, the printer renames a let's name a later statement means otherwise or puts the let in a do: block, and a one-argument and/or prints as its argument 2026-09-25 22:23:37 +07:00
47cc213b42 Return types read off the body and the converter's latest fixtures live together 2026-09-25 22:14:32 +07:00
a1e5e39dba Master's changes are merged into the dyn printing lane, with its converter fixture 2026-09-25 22:11:04 +07:00
d16fe79b79 A refused dyn view of a parameter names its declaration as the fix 2026-09-25 22:09:44 +07:00
4f060bb648 Dyn and typed containers print as [1 2 3] and {:a 1}, a refused dyn view names the value and a dyn fix in the file's own syntax, and a dyn function whose body gives no value says so by name 2026-09-25 22:01:40 +07:00
e81191d770 A bool returned from C reads as its low bit on --x86 as on LLVM, and the where-and fix and the x-1 hint follow the code's own syntax rather than its file name 2026-09-25 21:50:56 +07:00
18581a452c = and != compare bools, a match over a bool takes true and false arms, a match over a dyn takes keyword arms, and where predicates joined with and are refused with the comma or vector form as the fix 2026-09-25 21:35:31 +07:00
0fc258c434 Merge branch 'master' into worktree-agent-a46233a32d1912c78 2026-09-25 21:11:17 +07:00
3001aadff3 .fln files open in flan-fln-mode, which evaluates, moves over, indents and edits their statements, clauses and top-level forms 2026-09-25 21:07:16 +07:00
4d3688a519 Merge master into the .fln mode lane; a .fln arm sends its match whenever its value uses any name the pattern has, C-c C-s steps a .fln top-level form, and a comment block directly above a form is part of its text objects 2026-09-25 20:53:48 +07:00
111ee66a4b A match arm can be a number, char or string literal compared with =, over a number, a string or a dyn, with a _ arm required 2026-09-25 20:51:24 +07:00
f1bdcc8840 Editor code cut out mid-line carries :indent, the column its statement starts at, so the reader accepts its wrapped lines as the file does and reports every location where it is in the buffer 2026-09-25 20:35:33 +07:00
8fdf8513fd A _ body's errors are reported with every other error in the file, a literal return takes the type of the other exits, and a recursive _ function that gives nothing returns () 2026-09-25 20:17:44 +07:00
ad40123b25 Master's error recovery and return types read off the body live together, and two ways out of an inferred body that cannot share a type are refused with both named 2026-09-25 19:58:31 +07:00
ff88b9dad6 A defn whose return slot is _ (or a .fln fn with no arrow) takes its return type from its own body, recursion through such functions is refused by name, and a stale caller of one is told which line changed its type 2026-09-25 17:09:13 +07:00
4c336687ef Master's error recovery is merged, and the refusal memos are consulted only where a refusal is raised 2026-09-25 17:03:32 +07:00
30373ffda5 A converted comment stays with the form it was written beside when the printer reorders or splits bindings, the round trip checks each comment's form, and a snippet's first line sets its left edge 2026-09-25 16:17:12 +07:00
4b64dc5f65 Code-carrying dev requests name their syntax and starting line and column, so a .fln snippet sent from the middle of a buffer reads with the buffer's own locations 2026-09-25 15:57:09 +07:00
25e303caf4 Master's indented reader is merged, and its x += v over a place with a call in it reads as update, evaluating the place once 2026-09-25 15:56:51 +07:00
8200120bf3 flan convert keeps comments and number spellings in both directions, and a .fln message quotes the text as written, with let-bound match, if and block calls read as values 2026-09-25 15:47:29 +07:00
074b2da6f3 The indented reader refuses a continuation line that is not deeper than its statement, takes one-line statements in arms, then/else and defer, typed lets and bare-name blocks, and names the shape it wanted where it used to say two values cannot sit side by side 2026-09-25 15:30:52 +07:00
d7016f91c7 A .fln file is read by an indented reader that yields the paren reader's forms, every program entry point picks the reader by extension, and flan convert prints either syntax as the other 2026-09-25 15:04:32 +07:00