cd /news/ai-agents/well-typed-blog-not-slop-haskell-in-… · home › topics › ai-agents › article
[ARTICLE · art-180127] src=discourse.haskell.org ↗ pub= topic=ai-agents verified=true sentiment=· neutral

[Well-Typed Blog] Not Slop: Haskell in the Age of AI

A Marimo developer's follow-up experiment found that LLM coding failures previously attributed to Haskell also appear in Python when models use unfamiliar or newly upgraded libraries, shifting the question from which language is most token-efficient to how language APIs should be designed for unfamiliar code. The developer, who works on the open source Python notebook platform Marimo and its marimo-pair agent interface, reported that when asked to use an unseen Python API the LLM would either call help() on the module and reason through it or declare the task impossible and ask for a specific package version to be installed. The conclusions were published in a blog post on context complexity, with further work planned ahead of Zurihac.

key takeaway

LLM failure modes seen with Haskell reappear in Python when the model meets unfamiliar or newly upgraded library APIs, so API design for machine readers matters more than the language's training-data share.

read2 min views1 publishedDec 2, 2026

For my day job I am on the development team of an open source Python notebook platform called Marimo. Earlier this year we launched a tool called marimo-pair which provides an interface for agents to write code snippets and manipulate the notebook environment. Because notebooks force LLMs to write inspectable code incrementally I figured they are a good environment for answering questions about productivity and efficiency.

I ran an initial experiment here where I found that because LLMs knew Python libraries better they could produce more idiomatic Python in fewer tries. That is if you ask an LLM to sum a column in a CSV file it’ll do something like:

import pandas as pd

df = pd.read_csv("./my_file.csv")
print(df["col"].sum())

Whereas if you asked it to do the same in Haskell it either:

I thought the question was settled for a while until I tried using marimo-pair on newer Python libraries that weren’t well represented in the training data. Even newer versions of common libraries with major upgrades and noticed the “Haskell” failure modes appear.

When asked to use an unseen/unfamiliar Python API the LLM would either:

help() on the module and then reason its way through. However, oftentimes it would say it’s not possible and ask you to install a specific version of the package. So I reframed my question from which language is more token-efficient to - how do you design a set of language APIs to make writing unfamiliar code easier.

The result was this blog post. The conclusions were:

String as a type everywhere for example). I’m going to continue some of this work next year in preparation for Zurihac but I think more generally the question of LLM language productivity needs a really good design/setup and every experiment needs to be clear about what it’s measuring and why.

── more in #ai-agents 4 stories · sorted by recency
── more on @marimo 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/well-typed-blog-not-…] indexed:0 read:2min 2026-12-02 · —