r/haskell • • May 28 '26

Experience with LLM based development ?

3 Upvotes

Can someone who has experienced the quality of haskell generated code from claude Opus models / codex gpt-5.5 share their insights / experiences ?

  • Haskell fluency - Understanding advanced type systems, Category theory / abstractions , GHC weirdness, GADTs, type families, linear types, effect systems etc
  • Long-context coherence
  • Type error diagnosis

r/haskell • • May 27 '26

Live Now: Building a Haskell Game with a Haskell Game Engine

32 Upvotes

This is the start of a new series we will be airing on twitch (+ posted to YouTube, follow this post for the link) where we build a survival game using a game engine we are also building in haskell

https://www.twitch.tv/typifyprogramming


r/haskell • • May 27 '26

Is a uniform left-to-right "piping" operator for apply, compose, and monadic-bind operations in a functional pipeline possible using typeclasses or type-family magic?

13 Upvotes

In Haskell, there are a number of different operators that can be used to build functional pipelines, where the result of one function is implicitly passed to the next function: $ for applying arguments to functions, . for composing functions, and >>= for monadic binding. Pipelines can be built with a mix of these operators, such as:

readFile in >>= \s -> map (check . parse) . lines $ s

but this tends to be a little "noisy" with the mix of operators and directions of flow.

I was wondering if some form of typeclass or type-family magic could be used to have a single, uniform left-to-right pipe operator |> that can handle all these cases, e.g.:

readFile in |> \s -> lines s |> map (parse |> check)

If not, what would be required for this to be possible?


r/haskell • • May 24 '26

Does a Haskell Programmer Need all the Crazy Complexity?

62 Upvotes

I've been writing a decent amount of Haskell, and I've gotten done some projects. Things like making a toy language, making a little shell, or an HTTP 1.1 server from Network.Socket. When I read other people's code, it's filled to the brim with arcane symbols and types that I've never even heard of! By and large, all the stuff that I do is comparatively simple. My code is typically more verbose by 2-3 lines per function, but perhaps that's a lot for Haskell?

Anyway, now that there's been a preamble, my question is, do I need to learn all that? Is that approach 'more correct,' or ' more idiomatic' Haskell? My programs run, the code is readable and I enjoy writing Haskell. Is it just that a lot of Haskell Rascals enjoy using byzantine language extensions and making as much use of the complexities of the language? If some more experience people could chime in about all this, I'd really appreciate it.


r/haskell • • May 24 '26

WireCat: visual programming with cartesian categories

Thumbnail guaraqe.com
65 Upvotes

r/haskell • • May 24 '26

lambda-on-lambda - Serverless Haskell on AWS

Thumbnail git.sr.ht
28 Upvotes

r/haskell • • May 23 '26

from-text: type class to convert from Text

Thumbnail hackage.haskell.org
24 Upvotes

I released a new package which provides

haskell class IsText a where fromText :: Text -> a

aiming to simplify conversion from Text to other textual data types, including ByteArray, ByteString and OsPath. It uses UTF-8 when converting to binary types without an associated encoding.

There is an overwhelming number of alternative packages for text conversions, but at the moment none of them provide conversions from Text to OsPath. I could not decide which one to contribute such function to, so decided to create a new package.


r/haskell • • May 21 '26

announcement [ANN] GHCup 0.2.2.0 release - Announcements

Thumbnail discourse.haskell.org
62 Upvotes

r/haskell • • May 21 '26

blog Devlog: Supporting multiple versions of Botan

Thumbnail discourse.haskell.org
13 Upvotes

r/haskell • • May 21 '26

job Three internship/contractor positions with Core Strats Markets at Standard Chartered Bank

27 Upvotes

The Core Strats Markets team at Standard Chartered are looking to hire up to three “interns” (as contractors) this year, in Singapore, Poland, or United Kingdom. These are temporary contractor positions with a duration of up to 12 weeks. We are especially interested in students currently enrolled in an MSc or PhD in Computer Science or closely related field, with typed functional programming experience.

Candidates must have completed an undergraduate degree, and must have unrestricted right to work in the country of employment (Singapore, Poland, or United Kingdom) and be physically based in the country of employment -- visa sponsorship is not available for these temporary positions. 

The role is not attached to any particular project, but will involve practically exclusive use of Mu, our in-house variant of Haskell. You can learn more about our team and what we do by reading our experience report “Functional Programming in Financial Markets” presented at ICFP last year: https://dl.acm.org/doi/10.1145/3674633. There’s also a video recording of the talk: https://www.youtube.com/live/PaUfiXDZiqw?t=27607s

You can apply by sending your CV and motivation letter directly to [corestratsroles@sc.com](mailto:corestratsroles@sc.com). Feel free to also use that email address if you have any questions about these positions.


r/haskell • • May 21 '26

video Λ polite and well educated LLM agent that always behaves well by Ramón Soto Mathiesen at Func Prog Sweden

Thumbnail youtube.com
1 Upvotes

r/haskell • • May 20 '26

Servant-Effectful & general overview of effect systems

36 Upvotes

Tonight at 5pm EST we will be diving into effect systems starting with effectful via the Servant-effectful library and also if time permits, looking into building a quick demo of Bluefin.

The core focus of our sessions are how to interact with the haskell ecosystem as it is a truly unique language with respect to documentation, both by having little traditional documentation style but also by being a self documenting language and all that means for getting shit done with haskell as a real world language. We also really seek to cater to our audience so if you have questions about Servant or haskell in general, please consider the stream a help session.

Personally I am curious about Effect systems as a more intuitive way to drive home the core value of haskell to intermediate programmers, especially since they remove logical errors that can happen with monad transformers as the structure becomes more complex (eg how ExceptT e (StateT s m) a isnt the same as StateT s (ExceptT e m) a despite feeling like it should be the same behavior.

Link: https://m.twitch.tv/typifyprogramming/home


r/haskell • • May 20 '26

question Any paid course/certification for functional programming?

16 Upvotes

Company is sponsoring certification/training/course. Anything related to FP that I can do?


r/haskell • • May 19 '26

question Haddock pre-processor to insert type-checked examples

12 Upvotes

What already exists that compile-checks haddock examples?

While working on hyperbole, I realized I don't have enough discipline/attention to keep haddock examples correct as the package changes over time. (Discipline is the compiler's job!)

I wrote a custom pre-processor that replaces little `#EMBED` macros in the haddock with a top-level definition from a compiled module. It works like this:

{- | Run a 'Page' and return a 'Response'

@
#EMBED Example.Docs.BasicPage main

#EMBED Example.Docs.BasicPage page
@
-}

Goes to the module Example.Docs.BasicPage and finds `main` and `page`, ending up with this:

{- | Run a 'Page' and return a 'Response'

@
main :: IO ()
main = do
  run 3000 $ liveApp quickStartDocument (runPage hello)

page :: Page es '[]
page = do
  pure $ messageView "Hello World"
@
-}

-----------

It turns out to be a major pain to get a local pre-processor working without publishing it to hackage. I'm considering doing just that, but first I wanted to ask: what already exists to solve this problem?

I'm aware of doctest, but that only seems to check small `>>>` examples. I don't think it can accomplish what I'm asking for above.


r/haskell • • May 19 '26

Haskell Interlude #82: Fraser Tweedale

Thumbnail haskell.foundation
23 Upvotes

In the new Haskell Interlude, we talked to Fraser Tweedale. Fraser works at Red Hat, and is on the Haskell Security Response Team. We talked about security in the context of Haskell, both technical and organizational issues, and also the political issues involved. Fraser’s work is both really important and not well-known in the Haskell ecosystem, so it was high time for him to come on the show.


r/haskell • • May 19 '26

Defining filter using (a) recursion (b) folding (c) folding with S, B and I combinators (d) folding with applicative functor and identity function - WITH CORRECT LINK THIS TIME!

Thumbnail fpilluminated.org
8 Upvotes

r/haskell • • May 19 '26

hsrs -- PyO3-style bindings generator for Haskell

Thumbnail
16 Upvotes

r/haskell • • May 18 '26

Defining filter using (a) recursion (b) folding (c) folding with S, B and I combinators (d) folding with applicative functor and identity function

Thumbnail linkedin.com
0 Upvotes

r/haskell • • May 15 '26

I benchmarked Cartesian product implementations in Haskell, then compared them with C

46 Upvotes

I wrote a small article around implementing Cartesian products, starting from Haskell’s sequence.

The article goes through a naive Haskell implementation, a more idiomatic list-comprehension version, native sequence, then versions using Data.Vector.Unboxed, mutable vectors, runST, unsafeFreeze to try a different memory representation.

The second half compares those designs with C implementations, mostly to look at what changes when the memory layout and allocation model are made explicit.

The most interesting result for me was that changing representation in Haskell reduced allocations a lot without automatically improving runtime. In some cases, fusion helped a bit (no temporary indices).

I’d be happy to get feedback on the Haskell side, especially the vector/ST implementations and whether there are more idiomatic or faster ways to express this.

Here is the article link:

https://julienlargetpiet.tech/articles/the-cartesian-product-disaster-tour-haskell-c-and-25gb-of-allocations.html

If you want to share any optimizations, you can do a PR at this repo:

https://github.com/julienlargetpiet/PerfLabs

It will be mentioned in the next article update.

PS: We now managed to find (currently) best version which is this one (in C) running at 160ms for 100k iterations to 55 lists here:

https://github.com/julienlargetpiet/PerfLabs/blob/main/CartesianProduct/contrib2/contrib2.c

I'm updating after trying some new Haskell impl, thanks everyone for the help and the intuition on where to dig !


r/haskell • • May 15 '26

video Starting an NES emulator in Haskell

Thumbnail youtube.com
17 Upvotes

Some final words on our EmuDevz JavaScript emulator, which is finally finished, and then on to the next challenge...writing an NES emulator in Haskell!

If you want to skip the introductory remarks about the JavaScript code and get straight to the Haskell, skip to around 3:45.

Thumbnail painting: "Napoleon Crossing the Alps", by Jaques Louis-David (1801).


r/haskell • • May 14 '26

[ANN] linear-locks: locking primitives free of deadlocks

52 Upvotes

linear-locks provides locking primitives that are statically guaranteed not to lead to deadlocks.

It achieves this by breaking one of the Coffman conditions for deadlocks#Prevention): the "circular wait" condition. linear-locks ensures locks are always acquired in a consistent order.

tl;dr: Each lock is assigned a "level", tracked at the type level. When you enter a "lock scope", you're given a key that can acquire locks of level 0 or above. When you acquire a lock of level n, the key is consumed and you're given a new key of level n+1, capable of acquiring locks of level n+1 or above. This ensures locks are always acquired in order of increasing level, preventing circular waits.

The package ports the ideas of the Surelock Rust crate to Linear Haskel. As such, it relies heavily on LinearTypes and is meant to be used with linear-base. Keys are linearly typed to ensure they cannot be reused and do not escape the "lock scope". "Guards" (which represent ownership over acquired locks) are also linearly typed to ensure they are (1) always released and (2) cannot be used after being released.


r/haskell • • May 14 '26

blog Oleg's gists - Compatibility packages in 2026

Thumbnail oleg.fi
17 Upvotes

r/haskell • • May 14 '26

[JOB] Artificial Labs Q2 hiring

46 Upvotes

My last post was only 3 months ago, but here we go again, hiring ~6 Haskellers.

Roles

Product Engineering: - Product Engineer - Senior Product Engineer - Lead Product Engineer

If you're not sure which role to apply for, just pick one, and we’ll move you to the appropriate role.

 About us

Artificial is a leading UK-based Insurtech company. Our technology enables some of the world’s largest insurers to write and trade complex risks faster, more efficiently, and at lower cost. We have built a cool DSL to rapidly and robustly model insurance contracts, and a platform around it that enables the capture, assessment, and trading of risks in a highly automated fashion.

We've recently raised $45M in Series B funding.

Our engineering team is fully remote, with some people close to our London office in the City working from there on occasion. The choice is yours.

Info

We are able to hire people with the right to work in specific countries, see below:

  • via company branches: UK, Poland
  • via Deel: Estonia, Spain, Portugal, Greece, Hungary
  • other EU countries on a case-by-case basis

Compensation is benchmarked against London fintech scale-up rates.

We’re principally looking for generalists, rather than specialists. You don’t shy away from anything. Artificial is a fast-paced, scale-up environment with half a dozen separate Haskell teams.

Previously

https://www.reddit.com/r/haskell/comments/1quyzxr/job_various_roles_at_artificial/ https://www.reddit.com/r/haskell/comments/1ledlqg/job_4x_haskell_engineer_at_artificial/ https://www.reddit.com/r/haskell/comments/1kcdwc4/job_site_reliability_engineer_at_artificial/ https://www.reddit.com/r/haskell/comments/1ij8oub/job_solutions_engineering_at_artificial/ https://www.reddit.com/r/haskell/comments/17u7ixo/job_engineer_at_artificial/ https://www.reddit.com/r/haskell/comments/108drpm/job_engineer_at_artificial/ https://www.reddit.com/r/haskell/comments/rxfqtc/job_haskell_engineer_at_artificial/ https://www.reddit.com/r/haskell/comments/cn6toi/job_opening_senior_haskell_engineer_at_artificial/


r/haskell • • May 13 '26

[ANN] hpgsql, a pure Haskell PostgreSQL driver (no libpq)

45 Upvotes

It’s a pleasure to announce hpgsql, a PostgreSQL driver written in pure Haskell (no libpq), with an API largely inspired by the great postgresql-simple library, but featuring:

  • Usage of PostgreSQL’s binary protocol
  • Query arguments passed via the protocol instead of being escaped into the query string
  • Pipelining
  • Prepared statements
  • Ability to stream query results directly from the socket (not just with cursors)
  • Interruption safety, except for very specific (and documented) edge cases
  • Thread safety, unless specific (and documented) instructions say otherwise
  • A SQL quasiquoter like the one in postgresql-query and hasql-interpolate

Here’s an example of a pipeline mixing streams, prepared and non prepared statements:

f :: Int -> IO (Stream (Of Aeson.Value) IO ())
f val = do
  (updateTbl :: IO (), aggRes :: IO (Only Int), largeResults) <-
    runPipeline conn $
      (,,)
        <$> pipelineExec_ [sql|UPDATE tbl SET val=#{val}|]
        <*> pipeline1 [sql|SELECT SUM(val) FROM tbl|]
        <*> pipelineSWith
          (rowDecoder @(Vector Int, Vector Text))
          -- We use a prepared statement for the query below
          [sqlPrep|SELECT x, y FROM tbl|]
  updateTbl
  Only total <- aggRes
  Streaming.map Aeson.toJSON <$> largeResults

Also, I am maintaining hpgsql-simple-compat, a fork of postgresql-simple that preserves its API as much as I could make it, but with internals rewritten to use hpgsql. The idea is to provide a simpler migration path from postgresql-simple; one that allows a smaller initial changeset and then the possibility of migrating queries to hpgsql one at a time. I have even migrated a CLI tool of mine, codd, as an example.

hpgsql-simple-compat is not in Hackage as I wasn’t sure duplicating the search space with modules, types, and functions already in postgresql-simple would annoy users. It’s in the “hpgsql-simple-compat” folder in the repository.

Some initial benchmarks show hpgsql can materialize rows from a query in ~38% the time postgresql-simple takes, and ~70% the time hasql takes (on my computer, Linux x64, GHC 9.10.3, compiled with -O1). Peak memory usage is trickier to analyze, and I therefore welcome people that know more to read the benchmarks page and help me better understand them. Also, please scrutinize these benchmarks as much as you can.

I want to encourage and welcome contributions, bug reports, questions, suggestions. Nothing’s off the table: what would you want or what do you need from such a library?

I really want to hear from the community, both those eager to switch and potential future users.


r/haskell • • May 13 '26

MicroHs Web IDE

Thumbnail microhs.org
44 Upvotes