ML
  • OCaml 96.9%
  • Zig 2.6%
  • Nix 0.2%
  • Emacs Lisp 0.2%
  • C 0.1%
Find a file
Steffen 261c37ceb1 the forall telescope binds implicits, not kinds
Syntax.kind was coherent when modules were a kind; the typeclass pivot made a
dictionary a value, leaving a value-level binder in a type-level enum. It is
binder_form now — BType/BNat/BEvidence — the shape of an implicit, differing in
when it is passed.
2026-08-21 23:33:19 +02:00
.claude review skill: pre-diff workspace pins a change ID, not a hash 2026-08-18 10:10:35 +02:00
bin amelie build renders diagnostics with source context 2026-08-20 14:14:56 +02:00
docs type nodes carry their spans; the parallel span arrays are deleted 2026-08-21 18:59:35 +02:00
emacs emacs sync (loop, labels, ..); break-with review-round doc closures 2026-07-25 16:36:31 +02:00
examples rename Mapping -> Functor; interface-naming principle in style.md 2026-08-15 21:28:32 +02:00
lib the forall telescope binds implicits, not kinds 2026-08-21 23:33:19 +02:00
runtime evidence is a value, not a frame; a lambda captures the siblings it uses 2026-08-14 16:41:30 +02:00
stdlib resolve distinguishes nat binders from type binders 2026-08-18 16:02:15 +02:00
test the forall telescope binds implicits, not kinds 2026-08-21 23:33:19 +02:00
.envrc direnv for zed integration 2026-04-21 21:04:07 +02:00
.gitignore make installable with nix 2026-07-08 01:52:32 +02:00
.ocamlformat ocamlformat 2026-05-03 15:51:58 +02:00
CLAUDE.md evidence is a value, not a frame; a lambda captures the siblings it uses 2026-08-14 16:41:30 +02:00
dune-project clean up dependencies 2026-05-04 23:24:04 +02:00
flake.lock dune scaffolding 2026-04-21 20:28:11 +02:00
flake.nix nix flake check 2026-07-08 10:07:08 +02:00
README.md trim readme 2026-07-15 01:02:56 +02:00

Amelie

Design

Amelie is a primarily functional language in the style of ML, but drawing inspiration from Rust, Haskell, Erlang, and Julia.

  • Inferred types with mostly optional annotations
  • Pascal/ML hybrid syntax

TODO LIST

  • make jit default backend for repl
  • finalizer trait
  • value/reference semantics (future)
    • unboxed currently means only "inline this struct field" (a layout choice on Flat types); binding-level unboxed modes and the mode-analysis pass were removed for now
    • open question: a separate ref/borrow concept for passing values around
      • box entails shared ownership
      • ref entails borrow
      • box coerce to ref by lending
      • ref must be cloned to make a box
    • GC + ref semantics
      • moving GC breaks refs
      • box can actually not be coerced to ref
  • port runtime to a less deranged language
  • fuzzing?

Syntax

  • imperative programming
  • docs in sigs
  • try/try let or similar
  • user annotations, derives
  • multiline string literals
  • string formatting
    • how do we do formatting strings in a language without macros?
    • type safety; an f-string defines an ad hoc record needed for interpolation
    • basically just N things that are Show
      • later; Debug, Binary, Hex
    • f strings are closures (!)
      • compile to fn() -> String

Type system

  • clean up inference of interface/instances to use a more general unification concept
    • currently ad hoc checks and manual substitutions
  • ghetto row poly for tuple generalization
  • kind checking pass to catch kind errors with a better error isntead of failing unification
  • some kind of string, chars/bytes, list
  • complex numbers
  • associated types for interfaces

Standard Library

  • persistent datastructures
    • making them in amelie is a litmus test for the language

Module system

  • packages vs. modules
  • how is module hierarchy defined and how are modules named?

Codegen

  • unboxed field layout (inline Flat struct fields; see llvm-roadmap Phase 6)
  • make structless enums flat with repr u64
  • tail calls
  • stack traces?

Deranged Ideas

  • Arity part of function identity
    • Natural way to hide helper functions (pub fn sum/1 calls fn sum/2 with accumulator as an example)
    • Makes (-)/1 and (-)/2 completely natural
      • Num interface could define both, or (-1)/1 in terms of (-1)/2 and zero

AI

Claude Code has been used extensively as a sparring partner, and for generating the most tedious parts of the code, like the parser.

The core of the semantic analysis is based on a prior artisanal imlementation ™️ of the paper "Algorithm W Step by Step" (Martin Grabmüller) by myself.

The project has now taken on a sort of personal experiment of pushing vibe coding to the limit of what I'm comfortable with.