Posted by cosmic_quanta 9 hours ago
An ideal language for agentic AI I would think is extremely strict, where the AI can iterate over the tooling for correctness. It would probably be less verbose and more terse to allow the AI to be more efficient with tokens.
In fact if I have to ship in a different language, I'll often do a Haskell version first to steer towards isolating IO, enforcing referential transparency, and generally picking up other functional patterns that are a good idea no matter what. Then I'll port the Haskell version to whatever the solution demands.
As lower-hanging fruit, to get some style steering, but not the strictness/correctness assist in implementation, there's also doing code sketches in hs - writing without testing - and then asking for whatever code as inspired by / in the spirit of / based on the reference sketch.
Token efficiency is specifically the place where strict languages get a little trickier. With dynamic languages where the model has a ton of training data, like Python, the agents are really good at writing code that just works. You still have challenges there, but they're just different than the challenges you hit with a language like Haskell/Lean/Agda etc. With Lean, for example, the amount of things the agent decides it needs to prove for a relatively trivial operation can lead to an absurd amount of code. And the way it decides to prove them can be borderline labyrinthian. It sort of plays perfectly towards current agent weaknesses, where agents can run off and reinvent a lot of machinery and build unnecessarily complex abstractions.
And those iterations have a cost. Even if the final artifact is more terse, the path to getting there can involve a huge amount of backtracking and rewriting and off-by-one syntactic corrections.
Ultimately, a lot of this comes down to developer experience. Getting useful error messages for the agent, having fast compile times so that the agent can iterate quickly, providing useful utilities for debugging, etc. There was a popular blog post specifically about Haskell that generally makes this point--the Haskell language is, in a vacuum, ideal in a lot of ways for AI, but the Haskell developer experience and ecosystem made it hard for this team to build with it via agents: https://avi.press/posts/2026-07-10-after-7-years-in-producti...
Note: I am not advocating against using these kinds of language. Obviously, I still work in Lean and a little in Agda and some related languages/projects, so I think this direction is right. Probably biased in that I love them with or without LLMs, but I do think they're also more ideal for AI development. There are still just challenges in getting agents productive in them, and most of the challenges are not about the type systems but the actual ergonomics and dev experience.
So, I could write what I want in haskell, and it's faster for me than to have an LLM do it. The haskell would be high-level enough and precise enough to describe what I want the program to do with less iterations than I'd have with an LLM writing code, finding its own bugs, fixing them, then having me ask it what it did, tell it what to do differently, etc.
Direct control is very powerful. LLMs take that away from us, in exchange for a great speedup. But perhaps we can use LLMs to give it back to us by making our actual programming languages more powerful.
But I think this is actually in the design of many languages already, especially in languages like Lean, where you can prove that the presentable API is correct.
Here's one rough example that is related to this direction:
A common convention in Lean is to write essentially two versions of a function, with a theorem proving their equality or correspondence.
So you can write a more demonstrative version that is more easily understood, which you can treat sort of as a spec that all other implementations must satisfy. And then you can set the agent loose to do whatever nastiness it wants to do to improve performance.
Here's a fun write up from someone doing just this with zip file compression: https://kim-em.github.io/blog/2026-7-24-why-lean-is-faster-t...
> With dynamic languages where the model has a ton of training data, like Python, the agents are really good at writing code that just works.
I'm confused how the former supports the latter here.
Surely, you mean that LLMs are not the right kind of "AI". Languages like Haskell expose how fundamentally porous LLMs are with information.
I wouldn't even say it's the dynamic nature of Python that leads to good results, but the consistency. Javascript is the obvious counterexample. There's far more javascript out there to train on than any other programming language, yet LLMs are terrible at writing it too.
Admittedly I'm not much better, Agda has some crazy scoping rules at times and its operators are a mess, so much worse than Haskell, but at least I don't have to re-learn from scratch after every compaction.
I mean, free functions and no general nice trait/struct/enum based architecture, random `Mutex`/`RwLock` everywhere, all your big futures inside a `tokio::select!` etc.
Yes it's great when you do your first Rust project. After a year it's a nightmare if you don't keep a clear control how the code is generated and organized.
But I just don’t think terseness matters much; most of the cost is spent on reasoning tokens, not the sheer volume of code output.
The benefits of strict are still the same: once the code grows bigger you have alll kinds of guarantees built into the software, that JS/Py/Bash/C needs lots of test achieve the same.
Since writing code is cheap, it like to go more on the tests and the strong typing, simply because it is so cheap. Why write Ruby/Py/JS when you can write Haskell/Kotlin/Rust? There's simply no reason not to be doing TDD these days.
A priori, it does seem strange. But the relative Haskell vs Python tokens in the internet go a long way to explaining it, as another commenter has said.
Nobody prepared it for adoption nearly as much as Rust evangelists did for their language. Years of hard work they invested into maintaining bindings as hobby projects paid off.
My former company was generous enough to publish most of these[0] as open source projects. But what's really telling is that oftentimes vendoring a commonly used OSS library was unavoidable.
[0] Here's a potentially incomplete list: https://chatgpt.com/s/t_6af76fd8f2a081918fa37f8c30bdb3ba
I used prolog for a project and GPT 6.1 Sol repeatedly made dumb mistakes as if it doesn’t understand the symbolic resolution capabilities.
For vibe coded Haskell id not be surprised to see it just not use strict types, hucking strings around
Looks like the claim is true that Sol sucks at the long tail of languages (vs. battle opponents). https://micjm.com/blog/gpt-6.1-sol-long-tail-languages/
The ideal language for the engineer driving the agent has maximum comprehensibility, since review and understanding are the real bottlenecks now. I'm also pretty sure this doesn't describe haskell. It incompletely describes rust I think.
It does describe ocaml. And also gleam and maybe scala. And moonbit, developed by someone who is a proven expert in exactly this domain and explicitly targeting this problem space.
"higher level projections" - wtf is this even about?
That's doubtful. It's not strict in any way that matters, especially when LLMs are writing it. You still have to rely on tests for everything. The languages that are strict are still largely ignored.
It is seeing adoption because of a well executed advertising campaign combined with "C++ without the dependency hell" being a real value proposition.
If I could have a vision for Haskell, it was for it to be useful. Academic research and making compilers is cool, a few cli things here and there are cool too, but why can't we build music players and game engines and flutters and web pages with it? The language is way more elegant and beautiful than all the JS/C like languages out there and I really wished I could use it for the things I did. I'm aware of Servant/Yesod/IHP/Miso/Reflex for web, GTK/Monomer for desktop, TidalCycles for music, SDL/gloss for games, and various FFI/plugin, but none of them feel as coherent and worked on as the others, none of them are polished. Haskell surely needs good DX, but it also needs really better reasons for existing.
I think that is an unfair characterization of the video and the intent of Haskell's co-creator, based on the rest of your comment. Simon Peyton Jones makes a graph with two dimensions, useful/useless and safe/unsafe. The question he gets at is: how can one distinguish between effectful and effect-free computations in a programming language? He proceeds to characterize most useful languages as unsafe, and Haskell as useless but safe. He then spends the majority of the video talking about how useful languages are becoming safer, and at the same time how Haskell must become useful.
The famously friendly "Learn You a Haskell" book features its first "helloworld" program deep into the middle of the book, _after_ functors and (if I recall correctly) monads. It takes a very special beginner programmer to push that far through, working in the REPL, before they can write programs that do basic I/O.
I teach functional programming to college sophomores and juniors, and I would love to teach them Haskell. But I have to meet them where they are, and it would be difficult to do in Haskell. This is why we have taught either F#, Scala, or LISP over the years. F# in particular has a lot of the aesthetic qualities of Haskell while allowing impurity or mutability escape hatches without too much trouble. If somebody has truly beginner-friendly Haskell resources, I would love to hear about it-- I'm apparently not smart enough to chart that path myself.
It is important to clearly understand that Simon uses the word "useless" in the sense of having no side-effects on the external world i.e. if state changes are not reflected in the external world at some point then there is no practical purpose to it and hence "useless".
Functional languages solved this by using the type system at different levels to combine both effectful and effect-free computations cleanly.
Haskell can 100% be used to create all of these kinds of apps.
I think this article tries to figure out where can Haskell be the best.
As for a platform? If Haskell can offer the most secure, correct, and trusted web apps(the biggest platform), created with the help of LLM's, and they can use LLM's to make reading Haskell intuitive, that's a good place.
- Embedded toolchain and/or HAL/register map for my MCU family or CPU arhitecture
- A GUI library and/or basic I/O interaction library (keyboard/mouse to start)
- A GPU interaction library
- A web framework (Not going to roll my own DB interface, auth, user system, router, template system etc)
(Etc). I.e., some core library which handles the drudgery I can build my application on. If this is what you're getting at, this suggests a plan of attack!- Copilot (by NASA)
- MicroHs — for running Haskell on an MCU
GUI library and/or basic keyboard/mouse I/O:
- Monomer
- sdl2
- gi-gtk4
GPU interaction library
- OpenGL bindings
- vulkan bindnigs
- Accelerate — numerical GPU computation with an NVIDIA backend.
Web framework with database access, auth, users, routing, and templates:
- IHP
- Yesod
also the stuff i can now build in haskell with computer aid is epic. earlier this week i stood up what i believe is one of the/ if not the: best step file format reader writer on like every axis. some c ones are 20-30 percent faster on the largest possible cad assemblies i could try out.
an important axis that folks neglect to consider: the main way llms are getting scaled up for better coding is metric megatons of reinforcement learning traces, and type checking thats fancy gives a cheaper and faster training feedback loop.
with an llm as a sortah insane manic intern im looking over the shoulder, so to speak, im able to build the apis and designs i can see but cant type anywhere near the same scale. but i can specify the keystones for the exact designs quite compactly and then the agent kinda acts as a compiler inhave to correct and iterate running
Live step-through debugging and interactivity we think is pretty underrated in the Haskell ecosystem.
But incremental build has no reason to be slow, if the scope is as fine-grained as the function and type level.
Some languages are here merely to inspire others.
Not that Elm is such a success... But it is "simple" (Haskell and Perl are not; they big).
It just didn't get anything like the adoption that Solidity had at the time.
> we are going to build the best onboarding experience in the programming language ecosystem
> This can only be done if we commit to unix principles > write programs that do one thing and do it well
Rust is so approachable because Cargo does not subscribe to "do one thing". In fact Cargo does a bunch of things. Which is very convenient for newcomers, because they only need to learn one thing instead of a bunch (and how they interact).
The same holds for a GUI like a file explorer with buttons and interactions like drag / drop or marquee select, which is a bunch simpler than chaining 3 programs together to delete 30 old files and move some folder into a subdirectory.
It also explains why the most successful tools within the land of Unix philosophy are stuff like AWK, which really don't just do one thing. Or why PowerShell is less usable than GNU. Or why Emacs is an 'operating system'.
It's also a reason why the installation experience for Haskell is so bad: there are a bunch of programs and users don't know where to start and what they need.
> Cabal and Stack: which one should I install? > We recommend installing both.
One thing and one thing well.
Atleast it seems they've added a combined installer for these tools since the last time I've checked.
I went through several iterations, to get something that I could throw arbitrary packages at from Hackage, GitHub, etc. The result was a hacky mess containing a GHC plugin to dump Core code, a library to dynamically generate and evaluate strings of Nix to handle dependencies, shell scripts that piped `:t` commands through GHCi, and so on.
It was annoying, not because of the effort involved (I was doing weird, bespoke things; so it's no surprise it needed weird, bespoke code to be written); but because all of the functionality I needed already existed, just buried deep inside GHC/Cabal/etc.
Admittedly the GHC API has gotten much better in recent years; but there's no way the developers of "one tool to rule them all" can predict all of the different things that users will want it to do. Indeed, it's probably wise for such tools to avoid supporting/maintaining particularly weird/niche uses!
Having a collection of tools instead, which "do one thing and do it well", side-steps that problem entirely: users with weird use-cases are empowered to plug things together in a way that suits their needs, without needing the devs to add special features/flags just for them (or maintain their own forks with such flags, etc.)