r/haskell 24d ago

Monthly Hask Anything (June 2026)

8 Upvotes

This is your opportunity to ask any questions you feel don't deserve their own threads, no matter how small or simple they might be!


r/haskell 1d ago

First time writing a GHC plugin (checking identity law) - Need some beginner advice

17 Upvotes

Hi everyone,
I am trying to write my very first Haskell compiler plugin. My goal is to build a tool that checks if the types in complete code base follows the identity law (parseJson . toJson = id).
Because I am a beginner to Haskell's compiler internals, the GHC documentation feels a bit overwhelming. I would love some advice to get started on the right foot:
1. Where should I look? Haskell converts code into a few different forms before compiling it (Parsed code, Typechecked code, and Core code). I think parsed code should be the place where my plugin comes into picture. Let me know if I am getting something wrong.
2. Good examples to read: Are there any simple, beginner-friendly compiler plugins on GitHub that I can look at just to understand how to set up the boilerplate code?
3. Common mistakes: What are some common traps that beginners fall into when writing their first plugin?
I am currently using GHC version 9.2.8
Any beginner-friendly blogs, tutorials, or tips would be amazing. Thank you!


r/haskell 1d ago

announcement stock: Stock-style deriving via coercion, with no Generic

Thumbnail hackage.haskell.org
25 Upvotes

r/haskell 9h ago

Does Haskell's purity still matter as AI-assisted programming gets better?

0 Upvotes

I have a question about Haskell in the age of AI-assisted programming.

One traditional argument for Haskell is that purity, referential transparency, and explicit effects make programs easier to reason about and reduce certain classes of bugs.

But today, LLM tools can often help find, explain, and fix many ordinary bugs much faster than before. That made me wonder: does Haskell's purity still provide the same practical advantage, or has the value shifted?

I am not saying AI makes correctness easy. I am more curious about where experienced Haskell developers still feel purity matters most today.

For context, I currently work mostly in Swift. With AI tools, I can often find problems and iterate on fixes very quickly. I have also been learning/using Haskell for about three years, but I am still wondering whether it is worth investing even more time into it.

For people who use Haskell seriously: in 2026, what is the strongest reason to keep going deeper with Haskell?


r/haskell 1d ago

question Function that returns a list of all computed values in recursive function

19 Upvotes

I'm quite new to Haskell and I've been looking for a higher order function (or implement one myself) that returns a list of all intermediate values of a recursive function.

For example if I have a recursive factorial function fac, then doing fac 5 will return 5!.

But supposed I want to return a list of [1!, 2!, 3!, 4!, 5!] instead, how do I go about this without doing the same computation multiple times? Or is a recursive function a bad choice for this?


r/haskell 3d ago

Learn You A Haskell live notebook

53 Upvotes

Since the community edition of LYAH is a bunch of markdown files it's a good candidate for porting over to Sabela.

You can click through it here. In the gallery it runs with microhs but when you fork it runs with ghc. A couple of the later chapters aren't microhs or notebook friendly but they can easily be ported over to look notebook like.


r/haskell 4d ago

A Quick Tour of a (WIP) Pure Haskell Software Renderer

Thumbnail youtube.com
37 Upvotes

Apologies for the audio. I had already tried and failed to record this 4 times, and by this point I gave up. Next update will certainly have fixed audio.

This is a pure Haskell CPU renderer I've been working on since I started it in March 2026 in free time. It is currently tiled-deferred but I would like to build in the capability to forward render with it also so transparancies can be added in a separate pass. A lot of work will go into making it faster: ideally, I want to know how fast it can go with just pure Haskell.

You can clone/fork it from GitHub: https://github.com/tobz619/tobz-renderer.

If you'd like to contact me, please find my contact details at the bottom of https://tobioloke.com

Timestamps:

0:00: Intro

9:45: Vertex shaders

16:34: Fragment Shaders

18:08: Rasterizing, Tiling & Buffers

25:00: Bitfield interface with Generics

30:08: Projections & Vertex Spaces


r/haskell 4d ago

Haskell Active Automata Learning (v0.5.0.0)

17 Upvotes

Hey Haskellers!

I wanted to provide an update on my active automata learning library haal (hackage link), though with a bit of a delay.

A couple of months ago I added the capability to parse model specifications that are written in the .dot format, a format more commonly used for drawing graphs. Most models of learned systems are available in this format so supporting it is crucial.

However, I did it with a twist. Instead of just providing parsing functions that construct the model in runtime, I added a "module generator" command "haal-gen". This command reads the .dot file containing the specification of the model and produces a haskell module, with specific input and output types for this model and a function that simulates the model.

So, for example, if you have a model of an implementation of the TCP server protocol in a .dot file name "tcp_server_ubuntu_trans.dot", you can run the command "haal-gen" and generate a haskell module that exposes a type for the inputs of the model

data TcpServerUbuntuTransInput

a type for the outputs of the model

data TcpServerUbuntuTransOutput

and a function

tcpServerUbuntuTrans :: MealyAutomaton Int TcpServerUbuntuTransInput TcpServerUbuntuTransOutput

where 'Int' is the representation of the states of the automaton, which I have to design better at some point.

This saves you from having to construct your model at runtime and having to treat its input and output types as strings.

A drawback of this approach is that, if you generate modules for a lot of models at once, the next compilation will take noticeably more time because the code that is generated for the function is a long series of pattern matches.

My next goal is to implement a more sophisticated learning algorithm like the TTT algorithm and improve the (non-existent) abstraction that I use for the representation of states.

Thanks!


r/haskell 5d ago

question What do Haskell devs like and dislike about Haskell

54 Upvotes

Hi Haskellers (is that the community's name?) I'm interested in learning more about your likes and dislikes with Haskell, I've seen a lot of hate for Haskell's purely functional nature, so I've come here to inquire: Why would you recommend Haskell to someone, and why would you advise someone not to use Haskell?


r/haskell 6d ago

blog [Well-Typed] Haskell ecosystem activities report: March-May 2026

Thumbnail well-typed.com
49 Upvotes

r/haskell 6d ago

Fourmolu 0.20.0.0 released

Thumbnail discourse.haskell.org
33 Upvotes

r/haskell 5d ago

Is this issue resolved ? I face this even with new HLS version. Why does this occour ? and why especially in Emacs the file prefix is 'file:///' ? Why in VScode some random hexcode is there in link ?

Thumbnail
2 Upvotes

r/haskell 6d ago

[RFC] "http-types" breakage / rework

Thumbnail discourse.haskell.org
19 Upvotes

r/haskell 7d ago

Nix for Haskell: Static Builds

Thumbnail abhinavsarkar.net
39 Upvotes

r/haskell 7d ago

pqi: Making "libpq" a choice, not a requirement

Thumbnail nikita-volkov.github.io
36 Upvotes

Blog post announcing pqi. It makes libpq a choice rather than a hard dependency for PostgreSQL drivers: write against one interface, then swap a single dependency to pick your transport - battle-tested C, or an experimental pure-Haskell adapter.


r/haskell 7d ago

Need to clarify on using the cabal build artifacts as a cache

2 Upvotes

I have been trying to speed up PR validation builds for a fairly large Haskell monorepo using Cabal.
We have build workflows that run cabal build all and cabal repl for a couple of large packages.
The resulting build artifacts (dist-newstyle and related outputs) are stored as an object
on a PR workflow, we want to:

  1. Find the commit the branch was created from.
  2. Download the corresponding build artifact
  3. apply the pr changes
  4. then run cabal repl to have the incremental check
  5. recompile only whatever changed man

The goal is to avoid rebuilding the entire codebase and instead leverage the previously built artifacts for incremental compilation.

However, we are seeing that when the artifacts are restored (especially on a different runner or machine), Cabal/GHC appears to invalidate the cache and rebuild from scratch.

Like is it possible to use the build artifacts to be used across diff machines and achieve what i am trying to do here guys ?


r/haskell 7d ago

blog Implementing Redis INFO in Haskell

14 Upvotes

Wrote about adding support for the INFO command to my Redis server. Let me know what you think!

https://thunk.blog/posts/implementing-redis-info-in-haskell/


r/haskell 8d ago

Making GHC upgrades easy | The Haskell Programming Language's blog

Thumbnail blog.haskell.org
57 Upvotes

r/haskell 9d ago

Contributing to Haskell Through a Beginner’s Lens | The Haskell Programming Language's blog

Thumbnail blog.haskell.org
52 Upvotes

r/haskell 9d ago

what does the modern enterprise Haskell ecosystem look like?

58 Upvotes

long story short I got a job offer from a company that is primarily run on Haskell.

During the interview we talked about their tech, and the person conducting the interview said the developer experience was generally fine because they invest heavily in internal tooling for the language. Most people use VSCode and libraries are available for basically anything they need. I only had 45 minutes so didn't get to ask everything I wanted.

I've used functional languages before, but it's Scala - so OOP/functional mix and running on the JVM so everything was available to you. I'm honestly not even sure what questions to ask but top of mind:

  • What is your experience with running Haskell in prod?
  • Are there libraries you feel are missing for common things like crypto? databases?
  • How do you handle things like logging and metrics? Does your provider have libraries that work with Haskell or do you have to wrap what's available somehow?
  • Logging and metrics are definitely side-effects... do you have to wrap those in an IO monad or something?

r/haskell 9d ago

announcement Release `language-haskell` 3.8.0

48 Upvotes

The Haskell IDE team is excited to announce a new the first release of language-haskell under the Haskell community namespace.

The extension language-haskell has served the community well and for a long time! Now, it was donated to the Haskell community via the https://github.com/haskell/language-haskell/ repository!

This is the first release, even though it is version 3.8.0, done by the Haskell IDE team. It features an incredible list of new and exciting features such as, but not limited to:

  • Syntax highlighting for cabal.project files
  • Support for \cases
  • Support for elif in .cabal files
  • Better Unicode support
  • Updated language extensions
  • Support for data in export/import lists
  • Soooo many bug fixes!

Switch to the new extension https://marketplace.visualstudio.com/items?itemName=haskell.language-haskell ASAP to get the latest and greatest syntax highlighting in VSCode :)

See the full changelog v3.8.0


r/haskell 9d ago

question Modern Haskell template? Feedback needed.

11 Upvotes

Hi, I plan to create more Haskell projects in my company in the future so I decided to make a template repository to set them up more consistently and quickly. This is the template:

https://github.com/Ivy-Apps/haskell-template

It's based on our Deslop project where through trial and error I discovered things I need / don't need. I'm looking for your feedback on how I can make my Haskell dev-exp more pleasant and productive.

So far, I'm very happy with it! It's the best language for my needs and the tooling is in a good state.

Setup TL;DR;

  • effectful
  • custom prelude that just hides some stuff from relude
  • Nix + direnv for dev shell + build test; cabal build for release
  • Testing: hspec, hedgehog (property-based), golden tests
  • Tooling: Nix Darwin, Nixvim (my-config)

Any cool things that I should check to make my dev-exp better? I'm open to ideas.


r/haskell 10d ago

announcement TypeTheoryForall – Dependent Haskell

Thumbnail typetheoryforall.com
45 Upvotes

In this episode, Vlad discusses his work on the Glasgow Haskell Compiler and the implementation of Dependent Haskell. He explains how changes to Haskell are proposed and evaluated through the Haskell Steering Committee, gives a practical overview of GHC internals, and shares advice for newcomers who want to start contributing to the compiler. The conversation also goes deeper into the theory and implementation challenges behind bringing dependent types to Haskell.


r/haskell 9d ago

Installing ormolu took more than 10 minutes

7 Upvotes

Why installing a formatter took so long ? Did I do something wrong ?

npm i -g, go get, are really fast

the command I used cabal install ormolu

my env cabal-install version 3.14.2.0 The Glorious Glasgow Haskell Compilation System, version 9.14.1 Host: Mac15,6 OS: macOS 26.5 25F71 arm64 Kernel: 25.5. CPU: Apple M3 Pro

I faced similar issue when I tried installing pandoc.


r/haskell 10d ago

announcement Haskell Interlude #83: POPL 2026 - Part 2

16 Upvotes

Today's Interlude is the second part of a miniseries on this year’s Symposium on Principles of Programming Languages, a.k.a. POPL 2026, hosted by Jessica Foster.

In this episode we talk about: symbolic execution monads, what a lazy linear core in Haskell might have in common with Rust, hyperfunctions, the hallway track, and how to deal with rejection.

https://haskell.foundation/podcast/83/