Scarf Reluctantly Moves Away from Haskell After 7 Years Due to AI

Scarf has moved away from Haskell

Scarf Reluctantly Moves Away from Haskell After 7 Years Due to AI

After seven years running Scarf on Haskell, I have made the difficult decision to migrate to Python. While Haskell's type system proved reliable, its slow compilation times have become a critical bottleneck in an AI-driven development workflow. With LLMs generating code in minutes, the long wait for builds hinders parallel experimentation. Switching to Python has dramatically accelerated our feedback loops, allowing us to ship fixes instantly without sacrificing our high test coverage.

If an agent can draft a plausible change in minutes and then spends even 15 minutes waiting for the project to build from a cold start, the compiler has now moved from being a papercut to being the dominant cost of that thread of work.
  1. noelwelsh

    Wow. Not a Haskell user, but a big user of other languages with expressive type systems (mostly Scala; some Rust). My experience is the complete opposite. I can't imagine using a language without a good type system to catch all the junk the LLM produces. In fact I thought people would move away from languages from poor type systems, like Python, given the cost of using languages with expressive type systems has decreased with LLMs.

  2. crux

    I strongly agree with the premise of this article, which is why I am surprised that the author moved away from Haskell to Python.

    For some time now it’s felt clear (or at least extremely) compelling that agents need fast compile times in order to be effective, especially when you’re working in parallel. But the other thing that has felt just as obvious is that agents need strong type systems and narrow guardrails in order to constrain their outputs. These two things felt clear enough to me that, like the author, I wanted to choose a language ecosystem that maximized them. There _are_ languages that both have expressive type systems _and_ fast compile times. I wonder if the author investigated any of them, before deciding that no compilation time at all was acceptable.

    In my case I landed in OCaml. I think there are other options in the space—Go if you want less typing but faster compiles; Rust if you want more types but slower compiles. My mostly vibes-based evaluation landed on OCaml, and I’ve been pretty happy with the results.

  3. muragekibicho

    I'm not trying to be reductive but the article's a lot of words for "We're vibecoding our app now and the glorious (almost almighty) Haskell compiler is too slow for the agent to iterate it's mistakes until it gets it right."

  4. zeendo

    I am surprised by this take, honestly.

    We're a Haskell shop (and have been for over 10 years now) and are finding agentic development with Haskell to work pretty damn well.

    Cold compile times in Haskell are painful indeed. Our development practices don't really cause us to do that much - even with agents.

    It's unclear to me if the development practices at Scarf that cause them to hit this pain often are worth it if it means giving up Haskell because the compile times are too bad. Maybe they are, but I don't think so.

  5. thyrsus

    The article makes a convincing argument that Haskell compilation is too slow for the fast code generation of AI. But python?

    I have yet to experience a RHEL major version change that did not blow up all my tiny simplistic python scripts. I see the following options for using python:

    * run inside the container it was developed in

    * build your own python interpreter and environment and libraries and never use python pieces from the OS (i.e., act like a container without using one)

    * keep different versions of the code for different OS versions and use AI to rewrite all the code for the new OS version

    Start to consider third party dependencies, and none of those feels tractable without an AI assist.

    I've dabbled in C device driver code and kernel version differences were my only problem, not C. My perl scripts never break. My bash scripts rarely break. My dabbling in erlang didn't suffer from language version differences. My little elisp hasn't broken. Only python has inflicted this level of version pain. I have a colleague who says java has the same version pain as python, and from what I've seen from Jenkins maintenance he may be right, but I don't have colleagues who want to read java code, so I haven't written my own.

  6. cosmic_quanta

    For what it's worth, I've been using Haskell in production at Bitnomial, a financial exchange, and LLMs + Haskell is an extremely productive combo.

    Since Opus 4.6, LLMs have been pretty clever at using fancy types with libraries like Servant and Beam. The expressiveness of the types, combined with feedback from the compiler, means that agents converge quickly to something that works. I don't think I've noticed agents having to run the compiler so often that compilation speed is an issue.

  7. robertlagrant

    I like this article, but I would take some issue with the concept of the percentage of time taken up being a major issue.

    If you go from taking 2 days to write some code and 20 minutes to type check (which does seem long, don't get me wrong, but still) to 10 minutes to prompt some code and 20 minutes to type check, that percentage increase to me isn't enough to justify switching.

    You're still almost 2 days ahead, and converting those 20 minutes to 20 seconds are not going to make you ship a feature appreciably faster. But those types stand strong and I don't believe they can yet be replaced by an LLM believing they're correct.

    Having said that, I also think that Haskell should massively speed things up. Having strong types if nothing else should surely produce some amazing type-checking speed wins.

  8. matt2000

    I am increasingly wondering if we are in a post-language world in terms of development. Why would I ask an agent to write a server in anything other than the most efficient language, although efficiency can take several forms: runtime, token usage during development, and wall clock dev time (affected by slow compile times for example).

    My intuition is that type-safe languages with fast compilers are the best option. Maybe Go? I personally prefer Java just due to my experience running it in production, but am not sure there's many arguments for it over Go in a greenfield application. The other candidate would be Rust, but I worry about token efficiency and tool performance, I suspect it's not worth it for the runtime improvements.

    All that being said, in this article switching to Python seems like a wild choice. Relatively poor performance, no compile time checking at all. Python's big selling point was developer ergonomics, which seems largely irrelevant now.

    These are all just thoughts at the moment, I should try to find some evidence one way or another.

  9. rkrzr

    This is a good post. AI has changed the programming language trade-offs and, as someone running a company that uses both Haskell and Python, I hope that Haskell can adapt to this new era.

    I would like to add one additional observation, since we have been using both Haskell and Python in production for a long time:

    Haskell excels at platform work, while Python excels at product work.

    Our infrastructure teams work in Haskell (and also Rust nowadays), while our product teams work in Python. This gives us the best of both worlds (in my opinion): fast and rock-solid infrastructure on the platform side, and fast development speed and quick iteration cycles on the product side.

    This setup has worked well for years for us, but it remains to be seen how and if this is going to change as well in the new AI era.

  10. sn9

    OCaml is such an obvious solution to their problem that I'm shocked it wasn't even mentioned. You get fast compile times without sacrificing type safety.

More from this day

2026-07-10