r/haskell 3d ago

Monthly Hask Anything (September 2026)

4 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 1h ago

Haskell in emacs: Showing multiple lines in flymake diagnostics buffer

Post image
Upvotes

r/haskell 1d ago

announcement BOB 2027 (Feb 26, Berlin): Call is Open

19 Upvotes

As always, we're hoping for lots of cool Haskell submissions!
bobkonf.de/2027/cfc.html


r/haskell 1d ago

blog Context complexity: what is the Big-O of an agent API?

Thumbnail mchav.github.io
0 Upvotes

Been doing some experiments to see how much and in what conditions the claim "types are better for agents" holds.


r/haskell 1d ago

Schalu-compile is now in MELPA!

Thumbnail melpa.org
2 Upvotes

r/haskell 1d ago

Dependent if expressions without dependent types

Thumbnail haskellforall.com
62 Upvotes

r/haskell 1d ago

announcement MuniHac: a few slots (re)opened! Oct 9..11, Munich

Thumbnail munihac.de
9 Upvotes

r/haskell 2d ago

"Haskell is the best stream processing language I know of." - Doug McIlroy

Thumbnail tmpout.sh
88 Upvotes

r/haskell 3d ago

Bluefin is a capability system

32 Upvotes

I decided I am going to start describing Bluefin as a "capability system". This article explains why:


r/haskell 3d ago

Learning Haskell by building a freelance marketplace — Servant, rules, actors, and a server-owned SPA

13 Upvotes

I have been learning Haskell for like 2 years now. Though I am ok writing software in Haskell, there is still a long way to go. I decided the best way to ante up my skills is to build a real-world application.

I started working on a freelance marketplace with the following features:

  1. sellers, buyers, moderators, and collaborators.

  2. Sellers -> create gigs, add approved collaborators, fulfill orders, deliver code to Gitea (hosted on the server), documentation to S3, and resolve any disputes.

  3. Buyers -> clarify about gigs, make payment, verify code on Gitea, raise dispute on code not matching spec, accept delivery, submit reviews.

  4. collaborators -> work as a team with the sellers on gigs, submit their profile, accept or deny working with sellers.

  5. moderators -> resolve issues on gig reports, chat reports, order disputes.

Marketplaces are mostly state machines: order funded → in progress → delivered → disputed → completed, escrow release, dual-proof delivery, etc. I wanted that logic explicit and hard to “accidentally” break.

Brief on architecture:

- Servant — routes and handler types wired once; mismatches are compile errors.

- Server-owned routing — Haskell serves a cached HTML shell with data-app-id; the React (Ant Design) bundle mounts the page. No client-side router unless I add one later.

- Shell caching — split HTML template, inject page id per request.

- Frontend bundling — Vite build → static assets served by the same app.

- Rules + store layer — order/payment/delivery/dispute transitions in Haskell, not scattered in the SPA.

- Actor + supervisor (similar to Erlang OTP) — supervised S3 uploads, email, and anything needing a supervisor.

- Postgres, session cookies, Stripe Connect + webhooks, optional Gitea / Didit.


r/haskell 3d ago

blog Rust, Haskell, and the Architecture Behind Solana: Interview with Greg Fitzgerald

30 Upvotes

In this interview, we speak with Solana cofounder Greg Fitzgerald about why Rust ultimately proved to be the right fit. We discuss how his background in C++, LLVM, and Haskell shaped Solana’s architecture, what functional programming contributed to the design of a high-performance blockchain runtime, and why Rust’s combination of strong types, memory safety, and low-level control worked particularly well for BPF and virtual-machine development.

https://serokell.io/blog/rust-haskell-and-the-architecture-behind-solana-interview-with-greg-fitzgerald


r/haskell 3d ago

announcement V0.1.0.0 of ghcup-gtk released

Thumbnail discourse.haskell.org
22 Upvotes

r/haskell 3d ago

Functional Programming on FPGA: How Clash Works | QBayLogic

Thumbnail qbaylogic.com
52 Upvotes

r/haskell 3d ago

announcement Google Summer of Code 2026 Wrap-up

Thumbnail blog.haskell.org
24 Upvotes

r/haskell 4d ago

An exercise in interpreting compiler errors

5 Upvotes

I decided to use this as an exercise to get better at interpretting GHC's error messages.

I know that the error here is that I should use (+) because it's an infix operator.

But, ignoring that, how do I understand this error, and, bonus, how would I use that understanding to know what the error actually was?

(1)   ghci> (+ (5 :: Integer) (6 :: Integer))

(2)   <interactive>:93:4: error: 
(3)   • Couldn't match expected type ‘Integer -> a’ 
(4)                 with actual type ‘Integer’ 
(5)   • The function ‘5 :: Integer’ is applied to one value argument, 
(6)       but its type ‘Integer’ has none 
(7)     In the expression: (5 :: Integer) (6 :: Integer) 
(8)     In the expression: + (5 :: Integer) (6 :: Integer) 
(9)   • Relevant bindings include 
(10)      it :: a -> a (bound at <interactive>:93:1)

Here's what I know:

Line (3) says the type that type unification makes it expect.

Line (4) is the type of the value that I'm trying to apply.

Line (5) clearly says it's interpretting (5 :: Integer) as a function. Why?

Line (6) dunno

Line (7) the expression where all this happened

Line (8) working out from the function nesting

Line (10) dunno

What am I missing?


r/haskell 4d ago

A list of Haskell projects

Thumbnail github.com
25 Upvotes

I had made a list of Haskell projects for an undergrad course I was TAing. It was meant for beginners, but I don't see why one couldn't use it for fun otherwise aswell.

If you have some other suggestions, do send them my way. If you have implemented something similar to something on the list, I would love to link your repo or write-up for future reference.


r/haskell 5d ago

question Trying to figure out Cabal

9 Upvotes

I was trying to use a Haskell Image Processing library (HIP), and after muddling through figuring out how to get cabal to work (something was wrong with keys, but finding ghcup seemed to have fixed that issue), I ran "cabal install hip", to which it installed everything and showed a message that it worked, but it might not be what I wanted, and that I might want to use "cabal install --lib hip".

So I tried ghci and confirmed the library was not importable, and then ran "cabal install --lib hip" and it was now visible in ghci. Except now that I've left, and re-opened a terminal, it is no longer there.

Could someone please explain what cabal is doing, why it might not have been importable with the first command, and why it might not be importable now? Does it put the installs in a specific place? Because I wonder if I've just reinstalled it twice as well.


r/haskell 8d ago

announcement Haskell Interlude #85: Brent Yorgey

Thumbnail haskell.foundation
31 Upvotes

In today’s episode, we’re joined by Brent Yorgey, Associate Professor of Computer Science at Hendrix College and the creator, among other things, of the Diagrams vector graphics library and Swarm, a 2D programming and resource gathering game. We talk about teaching, domain specific languages, and competitive coding.


r/haskell 9d ago

announcement Vienna Haskell Meetup on the 24th September 2026

25 Upvotes

Hope everyone had a great summer!

We are hosting the next Haskell meetup in Vienna on the 24th of September 2026! The location is TU Vienna Treitlstraße 3, Seminarraum DE0110. The room will be open starting 18:00 and the first talk will start at 19:00.

We are excited to announce, the speaker for our next meetup is Dominik Schrempf (@dschrempf) (this time for real).

Compiling C to Haskell -- How hs-bindgen Translates C Headers

C has a library for everything, and those libraries are fast, battle-tested, and maintained by somebody else. Reaching them from Haskell is the hard part: a Haskell-native rewrite is a project of its own, and hand-writing bindings is tedious and error-prone. hs-bindgen automatically generates those bindings for you.

In this talk, we explore the vision and the architecture behind hs-bindgen: a compiler whose source language is C headers and whose target is Haskell modules. We discuss some challenges of reconciling C's low-level memory model with Haskell's rich type system. I hope to convince you that using a C library from Haskell is less like a project of its own and more like an afternoon's work.

This talk is going to be similar to the one that he will give at MuniHac 2026.

There will be time to discuss the presentations over some snacks and non-alcoholic drinks which are provided free of charge with an option to acquire beer for a reasonable price.

The meetup is open-ended, but we might have to relocate to a nearby bar as a group if it goes very late… There is no entrance fee or mandatory registration, but to help with planning we ask you to let us know in advance if you plan to attend here https://forms.gle/giYkuZ3CECYgZQ7A7 or per email at [haskellvienna.meetup@gmail.com](mailto:haskellvienna.meetup@gmail.com).

We especially encourage you to reach out if you would like to hold a talk or participate in the show&tell so that we can ensure there is enough time for you to present your topic.

Finally, we would like to thank Well-Typed LLP for sponsoring the last meetup!

We hope to welcome everyone soon!

Your organizers: Andreas(Andreas PK), Ben, Chris, fendor, VeryMilkyJoe, Samuel

Note: We are going to re-use this thread for announcing the Vienna Haskell Meetup in the future, so you can subscribe to this thread to stay up-to-date!


r/haskell 9d ago

blog A curmudgeon tries a language server

Thumbnail entropicthoughts.com
22 Upvotes

r/haskell 9d ago

Are these installing times for real

13 Upvotes

Coming back to Haskell since 2019 and honestly I enjoyed it a lot then. I'm installing a formatter "fourmolu" and I'm even using some useless flag

cabal install fourmolu -j --ghc-options=-O0

and 5 minutes later it's still installing, I guess it will take about 25 minutes to install some formatter. I'm on a fairly good computer, 16GB RAM

You can call me a newb or whatever yeah I don't have the correct ghc version or cabal or whatever. Thing is, I'm supposed to be able to install your package manager and ghc version and install a formatter within minutes, but I can't. I really hope I'm doing something seriously wrong here.

UPDATE: Your recommendations helped a lot and it is indeed a fresh new install, so I guess next time any of those dependencies do not take as long.


r/haskell 9d ago

Haskell diagrams: Tessellations

Thumbnail mgarletmilani.com
40 Upvotes

r/haskell 9d ago

Thoughts on this shuffle algorithm

0 Upvotes

I am a Haskell, well not beginner, but maybe intermediate. I developed the following with the assistance of ChatGPT. Is it too abstract? It's "neat" for sure, but is it reasonable?

import Control.Monad (foldM)
import Control.Monad.ST (runST)
import Control.Monad.IO.Class (MonadIO) 
import Data.Primitive.Array (Array, sizeofArray, sizeofMutableArray, arrayFromList,
                             freezeArray, thawArray, readArray, writeArray)
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as MV
import System.Random (newStdGen, uniformR )
import System.Random.Internal (RandomGen, StdGen) 


modifyMWithState 
    :: Monad m 
    => (t1 -> t2 -> t3 -> m b) 
    -> t4 
    -> (t5 -> t1) 
    -> (t4 -> m t5) 
    -> (t5 -> m a) 
    -> (t4 -> t2) 
    -> t3 
    -> m (a, b)
modifyMWithState algorithm container operationFor thawContainer freezeContainer 
                 lengthOf state = do
    thawedContainer <- thawContainer container
    let operation = operationFor thawedContainer
    newState <- algorithm operation (lengthOf container) state
    newContainer <- freezeContainer thawedContainer
    pure (newContainer, newState)


knuthM
    :: (Monad m, RandomGen g)
    => (Int -> Int -> m ())
    -> Int
    -> g
    -> m g
knuthM swapElements len prnGen = foldM randomSwap prnGen [lastIndex, nextIndex .. 1]
  where
    lastIndex = len - 1
    nextIndex = lastIndex - 1

    randomSwap currGen i = do
        let (j, nextGen) = uniformR (0, i) currGen
        swapElements i j
        pure nextGen


shuffleM 
    :: MonadIO m 
    => (StdGen -> m (a, StdGen))    
    -> m a
shuffleM shuffleWithGen = do
    prnGen <- newStdGen
    fmap fst (shuffleWithGen prnGen)


shuffleVectorWithGen 
  :: (Applicative f, RandomGen b) 
  => V.Vector a 
  -> b 
  -> f (V.Vector a, b)
shuffleVectorWithGen vec prnGen = 
    pure (runST (modifyMWithState knuthM vec MV.swap V.thaw V.freeze V.length prnGen))


shuffleArrayWithGen 
    :: (Applicative f, RandomGen b) 
    => Array a 
    -> b 
    -> f (Array a, b)
shuffleArrayWithGen arr prnGen = 
    pure (runST (modifyMWithState knuthM arr swapArray thawArray' freezeArray' 
          sizeofArray prnGen))
  where
    thawArray' array = thawArray array 0 (sizeofArray array)
    freezeArray' thawedArray = freezeArray thawedArray 0 
                                           (sizeofMutableArray thawedArray)
    swapArray a i j = do
        x <- readArray a i
        y <- readArray a j
        writeArray a i y
        writeArray a j x


shuffleVector :: MonadIO m => V.Vector a -> m (V.Vector a)
shuffleVector vec = shuffleM (shuffleVectorWithGen vec) 


shuffleArray :: MonadIO m => Array a -> m (Array a)
shuffleArray arr = shuffleM (shuffleArrayWithGen arr)


-- examples:


shuffledIntVector :: IO (V.Vector Int)
shuffledIntVector = shuffleVector (V.fromList [1..10])


shuffledCharArray :: IO (Array Char)
shuffledCharArray = shuffleArray (arrayFromList ['a'..'z'])

r/haskell 10d ago

question My self-built tool to learn concurrency

25 Upvotes

I've always wanted to learn about concurrency control, e.g., locks in operating systems & database systems. Some time ago, locks were all I knew about concurrency, but I found it hard to grasp any systematic material to learn about. The only thing I found useful was the pthread locks implementation.

Instead, when I was a junior student, I built this: https://github.com/kINo204/honcurrency, which was basically a virtual machine with an extremely simple instruction set + a round-robin scheduler, allowing me to implement and run my own spinlock, mutex, etc., all starting from a hardware TAS/CAS instruction. I hope this tool could be useful to someone else.

However, as I learn further about concurrency, mathematical methods like CSP, CCS, and pi-calculus come up. Those process calculi provide a mathematical approach to modeling and analyzing concurrency behaviors accurately.

With these, I found my project (or tool) insufficient for gaining complete knowledge of concurrency, which only covers the engineering part; but on the other hand, I tried out implementing CSP's channel with it, and assume there's also an engineering part of those process calculi.

Anyway, I've been totally confused. How & how much should I learn about concurrency, and how does everybody learn about it?


r/haskell 10d ago

"A monad is a monoid in the category of endofunctors" But what does that actually mean?

Thumbnail youtube.com
23 Upvotes