News for hackers. Stuff that matters.
Re:A technical vision for the Haskell ecosystem by ecshafer on Friday November 13, 2026 @12:45PM (#50487028)
I was thinking of Haskell recently, why isn't it more popular with AI? Haskell is very terse and token efficient, it has many expressive safety features. Rust is getting additional adoption because of its strictness, so hey why not have this in Rust over Javascript if it takes the same time to write?

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.

Re:A technical vision for the Haskell ecosystem by segmondy on Friday November 13, 2026 @12:57PM (#50487207)
It's as popular as you make it. Nothing is stopping you from using it. People generate code for what they are familiar with or have desire for. There are people who have wanted to give rust a try and AI opens that possibility up. There are certainly less people that want to try Haskell. Furthermore, Rust has more training data so LLMs generally will provide better Rust code than Haskell code. Because of LLM, I'm back into obscure languages that I didn't have the mental capacity to carry day by day. Prolog, Lisp and Forth, and like you said, they are very terse and token efficient. However, I must point out that terse was only relevant prior to the entire thinking era, a model could use 100k tokens to think only to give you 100 tokens of final output.
Re:A technical vision for the Haskell ecosystem by pimeys on Friday November 13, 2026 @02:04PM (#50488199)
I've been generating probably 500k lines of Rust with all the SOTA models (and now DeepSeek). Every model does an absolutely horrible job generating good Rust code. You have to babysit it and you need to question everything the model spat out.

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.

Re:A technical vision for the Haskell ecosystem by dcss_gardener on Friday November 13, 2026 @01:09PM (#50487401)
The ideal language for the AI has very short feedback loops with highly localized errors and minimal up front reasoning about types that itself provides a surface for flailing and errors. I'm not familiar enough with haskell to say for sure but I don't think this describes the language very well.

The ideal language for the engineering 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 doesn't really describe rust either.

It does describe ocaml. And also gleam. And moonbit, developed by someone who is a proven expert in exactly this domain and explicitly targeting this problem space.

Re:A technical vision for the Haskell ecosystem by jose_zap on Friday November 13, 2026 @02:22PM (#50488438)
Yet, "short feedback loops with highly localized errors" is exactly what Haskell is. You can start Haskell in interpreter mode (ghci) and you get instant feedback. Errors are always localized. Although my experience with claude in the last few months shows that it rarely hits a compilation error at all.
Re:A technical vision for the Haskell ecosystem by calebkaiser on Friday November 13, 2026 @01:14PM (#50487468)
I do AI research and mostly work with Lean these days. I love Haskell, though I wouldn't consider myself a particularly strong Haskell programmer (just never spent a ton of time working in it). I think you're spiritually correct that there are lots of reasons to use extremely strict languages with AI, but the reality is a little messier than you'd expect.

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 that they agent might think it needs to prove for a relatively trivial operation can lead to an absurd amount of code. 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...

Re:A technical vision for the Haskell ecosystem by sublinear on Friday November 13, 2026 @01:43PM (#50487899)
> I think you're spiritually correct that there are lots of reasons to use extremely strict languages with AI

> 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.

Re:A technical vision for the Haskell ecosystem by 3836293648 on Friday November 13, 2026 @03:27PM (#50489166)
Just reading chain of thought traces for Agda (I'm using Qwen 3.8-Flash-Next) and it's struggling so hard with just the syntax, long before it can struggle with semantics or type errors.

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.

Re:A technical vision for the Haskell ecosystem by calebkaiser on Friday November 13, 2026 @04:30PM (#50490053)
Yeah I know this pain. I actually have had some success by giving the agent a style guide for Lean that is strictly not conventional. The nice syntactic shortcuts and different modes that make Lean more ergonomic for humans, in my experience, actually make it easier for an agent to trip itself up.
Re:A technical vision for the Haskell ecosystem by lallysingh on Friday November 13, 2026 @04:44PM (#50490291)
I'm wondering the inverse, actually. That LLMs can make regular haskell programming (e.g. typing in code, not english that LLMs convert to code) powerful enough to prefer. Can we have LLMs do enough of the grunt work on building type machinery, dealing with compiler errors, looking up exact types and conversion systems, to make the APIs presented to us preferable?

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.

Re:A technical vision for the Haskell ecosystem by calebkaiser on Friday November 13, 2026 @05:34PM (#50491028)
Yeah, I think this is roughly where things are headed. And I think this is actually in the design of many languages already. This is made especially powerful by languages like Lean, as 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...

Re:A technical vision for the Haskell ecosystem by klntsky on Friday November 13, 2026 @01:20PM (#50487545)
Haskell does not have a good low level library wrappers story, unlike Rust.

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.

Re:A technical vision for the Haskell ecosystem by kccqzy on Friday November 13, 2026 @02:23PM (#50488446)
[delayed]
Re:A technical vision for the Haskell ecosystem by klntsky on Friday November 13, 2026 @03:17PM (#50489053)
Businesses care. I worked with Haskell in production (a fairly normal B2B SaaS). Some things you would expect to have in the ecosystem had to be maintained domestically.

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

Re:A technical vision for the Haskell ecosystem by win311fwg on Friday November 13, 2026 @01:42PM (#50487888)
> Rust is getting additional adoption because of its strictness

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.

It is seeing adoption because of a well executed advertising campaign combined with it being "C++ without the dependency hell".

Re:A technical vision for the Haskell ecosystem by drewr on Friday November 13, 2026 @01:43PM (#50487898)
It's my default for all the reasons you mention.

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.

Re:A technical vision for the Haskell ecosystem by jimbokun on Friday November 13, 2026 @04:35PM (#50490136)
With LLMs that’s not a terrible approach. They are generally very good at translating between programming languages.
Re:A technical vision for the Haskell ecosystem by mncharity on Friday November 13, 2026 @05:35PM (#50491049)
> do a Haskell version first [...] port

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.

Re:A technical vision for the Haskell ecosystem by solomonb on Friday November 13, 2026 @01:45PM (#50487928)
I write Haskell every day, both for work and in my free time. Without commenting on the general quality of LLM generated code, my experience is that Haskell is at least as good as any other language for LLM code gen.
Re:A technical vision for the Haskell ecosystem by kccqzy on Friday November 13, 2026 @02:19PM (#50488394)
[delayed]
Re:A technical vision for the Haskell ecosystem by flossly on Friday November 13, 2026 @04:15PM (#50489787)
One "did not compile, fix error, try again" loop takes so many tokens, that a well-trained-on lang like JS/Py/Bash/C easily outperforms a strict one.

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.

Re:A technical vision for the Haskell ecosystem by _doctor_love on Friday November 13, 2026 @03:20PM (#50489085)
The most interesting idea in this space I have heard is to have LLMs generate formally verified assembly. And then from that assembly generate higher levels projections in languages like Haskell to help the human understanding.
Re:A technical vision for the Haskell ecosystem by klntsky on Friday November 13, 2026 @03:37PM (#50489309)
It's not going to work. Formally verified assembly needs a low level spec which is comparable in length to the assembly code, so not really comprehensible.

"higher level projections" - wtf is this even about?

Re:A technical vision for the Haskell ecosystem by srcreigh on Friday November 13, 2026 @03:54PM (#50489509)
The ideal language is the one the agent knows how to use.

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

Re:A technical vision for the Haskell ecosystem by seizethecheese on Friday November 13, 2026 @05:17PM (#50490797)
For what it's worth, GPT 6.1 Sol severely underperforms in our OpenCode battle system so far. It's worse than DeepSeek 4.1 Flash https://agentduel.com/leaderboard
Re:A technical vision for the Haskell ecosystem by seizethecheese on Friday November 13, 2026 @05:52PM (#50491274)
We happen to have data on GPT 6.1 Sol and programming languages used, so I looked into this. 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/

Data from: https://agentduel.com/leaderboard

Re:A technical vision for the Haskell ecosystem by lcprk on Friday November 13, 2026 @04:58PM (#50490502)
It's not more popular because Dan Luu actually measured this [1] and those languages aren't better in practice.

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.

[1] https://danluu.com/pl-tokens/

Re:A technical vision for the Haskell ecosystem by GZGavinZhao on Friday November 13, 2026 @06:49PM (#50491831)
Is it really better than Lean though? I started learning programming in Haskell but gradually transitioned into Lean, both because it has almost everything Haskell has (minus laziness), great meta-programming support, and most importantly allows me to drop down into proofs / formal verification if needed.