{"slug": "llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits", "title": "LLMLL: a language for agent-written code, with a Haskell compiler that emits liquid-fixpoint constraints directly", "summary": "A developer writing under the handle machunter has released LLMLL, a programming language designed for LLM agents to write code, in which each function begins as a typed contract with a hole that an agent fills; the Haskell compiler checks the fill against predicates and preconditions/postconditions with Z3 before the patch is integrated into the AST, rejecting any body the solver cannot prove. The solver covers linear integer arithmetic, booleans, non-recursive sums, pairs, fixed-size bytes, maps and string literals, and outside that scope a postcondition is assumed and the tool says so by name. All code, including the Haskell compiler, was written by LLM agents, with the author acting as technical director, and the compiler emits liquid-fixpoint constraints directly rather than generating Liquid Haskell annotations, pinned to liquid-fixpoint 0.9.6.3.1 on GHC 9.6.", "body_md": "LLMLL is a language I’ve been building to experiment with AI (LLMs) writing code. A function starts as a contract with a typed hole for the body. The contract is a typed signature, optionally refined with predicates (`(where [x: int] (> x 0))`), plus a precondition and a postcondition. When an agent attempts to fill the hole, the fill must type-check, and then the compiler checks it against the predicates and conditions with Z3 before the patch is integrated into the AST. A body the solver can’t prove is rejected, and the program is left as it was.\n\nThe idea is that multiple, potentially specialized, agents work in parallel to fill all the holes at once.\n\nAll of the code, the Haskell compiler included, was written by LLM agents. My role was that of a technical director.\n\nThe parts this forum might find interesting:\n\nScope, so nobody has to ask: the solver covers linear integer arithmetic, booleans, non-recursive sums, pairs, fixed-size bytes, maps and string literals. Outside that, a postcondition is assumed and the tool says so by name. A proof shows the body matches the contract, not that the contract is right.\n\nA two-minute demo, using Apple’s goto-fail bug as the invariant (a scripted wrong body rejected, then a guarded one accepted): [LLMLL: a goto-fail body, rejected before the edit lands | LLMLL](https://machunter.github.io/llmll/demo.html)\n\nYou can try the rejection yourself: the demo page has a one-line Docker command.\n\nTwo questions I’d value opinions on from people who know this stack:\n\n1. Emitting `.fq` directly rather than generating Liquid Haskell annotations gave me control over the constraint shape, but it means maintaining my own VC generator. Is there a reason I’ll regret not going through LH?\n\n2. I’m pinned to liquid-fixpoint 0.9.6.3.1 on GHC 9.6. What’s the least painful way to keep up as Liquid Haskell and liquid-fixpoint move to newer GHCs?", "url": "https://wpnews.pro/news/llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits", "canonical_source": "https://discourse.haskell.org/t/llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits-liquid-fixpoint-constraints-directly/14915#post_1", "published_at": "2026-10-30 20:12:14+00:00", "updated_at": "2026-10-30 20:20:27.602348+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools", "artificial-intelligence"], "entities": ["LLMLL", "Haskell", "Z3", "liquid-fixpoint", "Liquid Haskell", "GHC 9.6", "Apple", "machunter"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits", "markdown": "https://wpnews.pro/news/llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits.md", "text": "https://wpnews.pro/news/llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits.txt", "jsonld": "https://wpnews.pro/news/llmll-a-language-for-agent-written-code-with-a-haskell-compiler-that-emits.jsonld"}}