Skip to content

release: 0.4.0 - #53

Merged
simontreanor merged 1 commit into
mainfrom
release/0.4.0
Jul 31, 2026
Merged

release: 0.4.0#53
simontreanor merged 1 commit into
mainfrom
release/0.4.0

Conversation

@simontreanor

Copy link
Copy Markdown
Owner

Bumps all four versioned artifacts per RELEASING.md: Cargo.toml (+ Cargo.lock), editors/vscode/package.json (+ a CHANGELOG entry), and editors/jetbrains/build.gradle.kts. pyfun --version reports pyfun 0.4.0.

0.4.0 rather than 0.3.1, because one change is source-incompatible: a dotted extern target whose module prefix cannot be decided from the text is now a compile error (#50). sys.stdout.flush compiled under 0.3.0 and failed at runtime with ImportError; it now fails at check time with the extern import sys it needs. A .1 would have told upgraders to expect only fixes.

What's in it, since v0.3.0 — 21 commits from two dogfooding reports and the sweep they triggered:

Language. Imported types nameable in a type declaration (#36, the one gap that changed a program's architecture rather than its phrasing); field access resolved from the base's type (#37); destructuring parameters for tuples (#38) and records (#40), plus _; a direct self tail call lowered to a loop (#39, #41).

Standard library. About 115 new members taking every module to the F# core set — List (#42), Seq (#44), Set/Map (#46), String (#47), Option/Result (#48) — then a member-by-member FSharp.Core audit (#51). Every built-in member carries a one-line description and its complexity in hover and completion (#43, #49), enforced by tests.

Fixes. Single-file pyfun run gives the program its own stdin (#35); a partially applied lambda closes over its argument, so List.map ((+) 2) emits lambda b: 2 + b (#52); every multi-argument callback's scheme put the effect variable on the wrong arrows, so List.fold could never accept an effectful folder (#51); Seq.empty lowered to a bare iter(), a TypeError (#51).

After merge: tag v0.4.0 and push it, which publishes pyfun-lang to PyPI via Trusted Publishing and attaches the .vsix to the GitHub release. The editor artifacts are then published by hand per RELEASING.md step 3.

Two dogfooding reports from real programs, and the standard-library sweep
they triggered.

Language:

* a `type` declaration can name an imported type, bare or module-qualified
  (#36) — the one gap that changed a program's architecture rather than its
  phrasing, forcing two modules into one file
* field access resolves from the base's type when it is known, so two
  records may share a field name without prefixes (#37)
* parameters destructure: tuples (#38), records (#40), and `_`
* a direct self tail call lowers to a loop, so an interactive turn loop no
  longer walks the stack (#39, #41)

Standard library — about 115 new members, taking every module to the F#
core set: List (#42), Seq (#44), Set and Map (#46), String (#47), Option
and Result (#48), then a member-by-member FSharp.Core audit (#51). Every
built-in member now carries a one-line description and its complexity in
hover and completion (#43, #49), enforced by tests.

Fixes:

* `pyfun run` on a single file gives the program its own stdin, so an
  interactive program is runnable by the command whose job is running
  programs (#35)
* a partially applied lambda closes over its argument instead of being
  wrapped, so `List.map ((+) 2)` emits `lambda b: 2 + b` (#52)
* every multi-argument callback's scheme put the effect variable on the
  wrong arrows, so `List.fold` could never accept an effectful folder (#51)
* `Seq.empty` lowered to a bare `iter()`, a TypeError (#51)

One source-incompatible change, which is why this is 0.4.0 and not 0.3.1:
a dotted `extern` target whose module prefix cannot be decided from the
text is now a compile error naming the `extern import` to add (#50).
`sys.stdout.flush` used to emit `import sys.stdout` and fail at runtime;
declaring `extern import sys` fixes it.
@simontreanor
simontreanor merged commit 6127093 into main Jul 31, 2026
11 checks passed
@simontreanor
simontreanor deleted the release/0.4.0 branch July 31, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant