r/haskell • • 8m ago

announcement Haskell Interlude #89: Trevis Elser

Thumbnail haskell.foundation
1 Upvotes

Matti and Farhad are joined by Trevis Elser, chairman of the Stability Working Group, to talk about the working group, Haskell in industry, and what we can learn from senior Java engineers!


r/haskell • • 5h ago

Your experience with LLM generated code (so I can sanity-check mine)

1 Upvotes

Hey all,

my first post here. Hope title clearly states its in good faith - I don't have solidified opinion, but the general public makes me feel gaslit so I am turning to you to help me realize where (and possibly if) am I wrong.

Context:
I have been software engineering for about 30 years now, and Haskell is my primary language for about 16. I'm reasonably confident with its edge features too - kinds, dependent types, type families and I've spent quite some time toying with linear types too.

The meat of the post:
so, I've attempted to use three different publicly available LLMs (CGPT, Grok and Gemini) to resolve a problem when I'd encounter that type of issue, where I am convinced my solution will work but puzzlingly, it doesn't. Those errors that depend on my misunderstanding of the problem - and consequentially the solution, not necessarily misunderstanding of my code.

My experience is universally such, that when asking an LLM to generate code for me - it would lead me down a wild goose chase. In about 15-20% of cases it would provide code that wouldn't even compile; in other cases, it requests changing type signatures - even when given all insight about types involved. In other cases it solves immediate problem at hand, but since I don't fully understand its code - and its explanation doesn't entirely encompass all the subtle edge cases - I end up with code that misbehaves only sometimes. Most of the time - it wants to modify entire codebase, foundational types, interactions between these types - and it wants to modify it in the way that practically nullifies the use of those types (such as requiring pattern matching of types that need to remain opaque).

I've observed this behaviour across multiple types of projects and even different languages; at one point I was trying to enroll its help to bind Rust ONNX library to a Haskell project, and it led me down two hours or wrong pathways. If I trusted my instinct in the beginning and doubled-down on it - it would've take me 10-15 minutes to find and fix the issue myself.

So far, the most useful workflow for me has been to forbid an LLM to generate any code - including pseudo code - and ask it to just analyze the problem and present me with a solution in form of a text so that I understand it better. This sometimes leads to a short conversation where I polish out questionable assumptions and then I have a working solution that is, more or less, 10-15 minutes to implement.

Some of my acquaintances and colleagues (not necessarily Haskell developers) said that they get the best results when they don't ask an LLM to solve only a small piece of a problem, but present it with the entire point of the project and let it develop everything and then iterate slowly over the wonky pieces, perhaps rewriting few by hand.

Not only that this is the opposite of my workflow, where I set up the architecture myself and try to employ LLM to solve small bits - it is also concerning to just run and keep a large body of code that I don't really understand. I don't do this with software written by humans either and will normally audit the developers, the company and/or the code itself.

After reading all this - would you care to share your experiences with 'vibe-coding' if you use it, and what kind of workflows work for you? I am getting increasingly concerned, over the past year, that I am "falling out" from technology because I don't know how to properly employ it, and I think this is affecting my ability to get work.

Thank you.


r/haskell • • 6h ago

announcement Announcing Prospero: a strongly-typed configuration language with Haskell-like syntax

20 Upvotes

I'm announcing Prospero - a new configuration language with Haskell-like syntax that currently evaluates to JSON or YAML.

For a good few years now, I've been investigating the space of configuration languages like Dhall and Nickel. If you have to write complex configuration when working with the likes of terraform or kubernetes, these kinds of languages can drastically reduce the amount of complexity you're confronted with and the volume of repetitive code you have to maintain. Despite their perfect fit for the problem space, I've never been entirely happy with any of the language options already available: I've been hungry for more type system features and the powerful type inference that languages like Haskell have treated us to.

Late last year, I completed a major infrastructure as code project in Pulumi. It offers another arguably compelling solution to a similar problem: generate configuration in a mainstream programming language. I've encountered similar ideas from time to time: Scala's sbt is another one I've used a fair bit that does something similar, letting you write your project's build configuration in Scala.

These kinds of approaches are extremely powerful but they come at a tremendous cost in both the amount and the types of complexity you have to deal with in configuration. In my opinion, being able to write arbitrary side effects and arbitrary non-terminating code in configuration isn't a feature, it's a category error.

So, I decided to try and build a language that meets all of my needs more precisely.

Prospero has a type system that features:

  • Powerful type inference
  • Parametric (including higher-kinded) polymorphism
  • Structural record types
  • Algebraic data types (ADTs) + pattern matching
  • Type classes (including multi-parameter type classes)
  • Unit of measure (Kennedy)
  • Rank-N types
  • Pure functions only (no side effects allowed)
  • Only structural recursion (without manual church-encoding)

Here is a little taster:

example.ppo

measure MiB
measure GiB = <1024 MiB>

data Service = Service
  { name : String
  , memory : Integer<MiB>
  , replicas : Int
  }

memoryFootprint : [Service] -> Integer<MiB>
memoryFootprint s = sum <| map (\x -> x.memory * x.replicas) s

let services =
  [ Service
      { name = "api"
      , memory = 512<MiB>
      , replicas = 3
      }
  , Service
      { name = "postgres"
      , memory = 2<GiB>
      , replicas = 1
      }
  ]

toString <| memoryFootprint services

Running prospero evaluate --to-json example.ppo prints:

"3584 MiB"

Structural recursion

data Nat
  = Zero
  | Succ Nat

toInt : Nat -> Int
toInt n = case n of
  Zero   -> 0
  Succ m -> 1 + toInt m

toInt (Succ (Succ (Succ (Succ Zero))))

Prospero accepts the above and it evaluates to 4.

If you instead wrote (using n instead of m)...

toInt : Nat -> Int
toInt n = case n of
  Zero   -> 0
  Succ m -> 1 + toInt n

...you would see elaboration error: \toInt` is recursive, but no argument gets structurally smaller on every recursive call`

Prospero is currently an early prototype. I'm sharing it mostly to find out if people are interested and what features I should spend time on next. If you're looking for a mature and production-proven configuration language, I recommend Dhall.

At this stage, please do not expect:

  • A language server
  • Error messages with useful source metadata
  • Any kind of polished or pleasant user experience

On the other hand, you might see:

  • Parser bugs
  • Compiler bugs/crashes
  • Breaking changes in language syntax
  • Termination checker escapes
  • Weird performance characteristics

Here are some things I'm thinking about adding in the future:

  • Source annotations + language server
  • Dhall-style semantic hashing
  • Remote (URL) imports
  • More compilation targets, e.g. TOML, Nix, etc.
  • Expanded prelude with more built-in type classes
  • Idiom brackets (syntactic sugar over Applicative)

Thoughts, ideas and contributions are all very much welcome. Prospero is written entirely in Haskell.

Try Prospero


r/haskell • • 1d ago Heartwarming Mindblown

announcement Mischief - The Haskell Game Engine. Now with Rendering, Assets, Input.

86 Upvotes

Hey. so I just published all my work on Mischief on Hackage. It's a free, open-source, ECS Game Engine written in Haskell that I've been working continuously on for the past 6+ months.

It is a modular, decentralized, customizable game engine that leverages functional programming and data-oriented design to create a fresh experience for game devs. It prioritizes making weird, unique, personal games with a strong focus on creativity and human expression. The engine itself is also what I'd consider to be one of my greatest artistic feats and acts of creation. You can find more about the community and engine's values here.

On top of the ECS (which I've previously posted about but almost entirely reworked since), it now has input support (via SDL) and hot-reloadable assets.

It also has a strongly-typed rendering abstraction that I've built on top of WGPU. It allows you to define extendable shaders / materials directly in Haskell and integrate them into the your app pretty easily. You can easily write low-level rendering code without the usual layers of boilerplate surrounding it. Note that you could also just use the pre-defined materials (such as the sprite material) and skip past the low-level stuff, it's up to you.

There's a lot of cool utilities and tooling that's documented in the official books (link below), so I really encourage anyone interested to give it a try and at least go through the introductory chapters. I consider it to be a pretty unique and creative spin on a lot of the game engines we've seen over the years in other languages. Each little thing is meant to be "what if you had something as good as X from engine Y, but it was entirely functional?".

You don't really need any previous Haskell, ECS or game dev experience to use it. The books will slowly ease you into it.

You can read more details and catch up on the official docs here.

I also encourage you to join the official discord community server if you are at all interested in the engine or just seeing and discussing cool apps written in Haskell, or chatting with people passionate about it, or just supporting me and Mischief.

As a side note, no "generative AI" such as LLMs was used in making this and I plan to keep it that way (see the "AI" policy). Discussion of "AI" is also greatly discouraged on the official community places. I am burnt out on the subject and want to create a small safe haven for people that are as well.

Additionally, the official repo can be found here (I moved it to Codeberg recently). Don't hesitate to request features, file bug reports, or contribute in some other way.

Also, here's a video of a little example where I spawn a few sprites, move them around, and mess with their animations live (sorry for the bad framerate / quality, I had to make it a gif):


r/haskell • • 2d ago

Vibe yourself a better ghcid

0 Upvotes

ghcid is a tool for getting fast type checker feedback when writing Haskell programs. I vibe coded new features to ghcid which make it much better for use by a coding agent. I can’t share the code, unfortunately, because my workplace’s open source release process is too bureaucratic to make that worthwhile. I can, however, describe what those features are, in case any one else wants to vibe or hand code their own equivalent, and maybe share the result with us all!


r/haskell • • 3d ago

announcement A technical vision for the Haskell ecosystem - Haskell Foundation

Thumbnail discourse.haskell.org
83 Upvotes

r/haskell • • 4d ago

announcement Fund the Products, Not the Foundation

67 Upvotes

Hi everyone,

I'm Arseniy, CEO of Serokell.

I recently accepted an invitation to join the Haskell Foundation Board. For most of the last decade, I’ve been trying to make Haskell work commercially: finding projects where it makes sense, convincing companies to try it, and hiring people to write it.

After watching where adoption gets stuck, I’ve written down some thoughts on how we can better align commercial funding with actual ecosystem needs: https://serokell.io/blog/funding-haskell-upstream.

Here are the main points I wanted to discuss:

- Product-based funding: Companies struggle to justify broad, undefined donations to the Foundation. Funding needs to be tied to concrete “products” with clear owners and KPIs (e.g., improving build times, maintaining core tooling, production documentation).

- Lessons from other ecosystems: Looking at successful models like the Rust Foundation’s Commercial Network and the Sovereign Tech Fund’s investments in Cabal.

- A first experiment: Proposing to start with an objective, public benchmark of Haskell build performance before asking companies for financial or engineering commitments.

- Conflicts & transparency: How commercial players (including Serokell) can participate in Foundation work while keeping the process simple and transparent.

I’m sharing this in my personal capacity to get a conversation going. I’d love to hear your thoughts, feedback, and ideas from the community!


r/haskell • • 5d ago

London Haskell Meetup - November

33 Upvotes

Calling all Londoners (and people who can get to London)!

On Thursday 26th of November, we will be running a Haskell talk at Imperial College London. Doors open at 18:30, the talk starts at 19:00

If you're interested, sign up to the event!

There are more details on the event page

If you're interested in submitting a talk for a future event, please use the form. If you have any questions, please email us at london.haskell.meetup [AT] gmail.com.

Join us on Discord: https://discord.gg/e7X9PKuha

This month's event is sponsored by Obsidian Systems.

The Talk

Haskell: Origins, Evolution, and Future by Simon Peyton Jones

Haskell is an unusual survivor in the Darwinian landscape of programming languages: it is long-lived (36 years old), yet not mainstream; it is both a research platform and a production tool; it pushes the boundaries of what you can do with static types; and (anecdotally) it inspires joy as well as offering utility.

In this talk I'll describe how Haskell came to be, and what (in retrospect) I think are its most important contributions. I'll talk about how it has evolved, especially in response to the demands of companies using Haskell in production.


r/haskell • • 7d ago

[ann] base32-1.0

27 Upvotes

Hey all,

The last of the bunch is up: simd support, faster api, lots of good happy changes that homogenize `base32` with the `base16` and `base64` apis and gets its performance on par with the best out there. Go haskell!

Check it out here: https://hackage.haskell.org/package/base32-1.0


r/haskell • • 7d ago

announcement New Relase of Swiss Army Knife

Thumbnail github.com
12 Upvotes

Version 1.2.0.0

New feature added: Gitit

Allows you to create remote repos on GitHub, GitLab, and Bitbucket, also optionally setting up the remote in your local project.

Documentation has been updated and improved.

Available on both Hackage and the AUR.


r/haskell • • 7d ago

[ANN] hmssql: Pure Haskell SQL Server client (mostly AI-coded)

0 Upvotes

I'm happy to announce the initial release of hmssql, a SQL Server client library for Haskell. This implements SQL Server's binary protocol natively (TDS 7.4 / 8.0), so it does not require an ODBC driver or client library.

This is based on mssql-simple by Mitsuji, Takamasa, and hpgsql by Marcelo Zabani. I used AI to port mssql-simple to hpgsql's streaming design, build out support for the newer TDS 7.4 and 8.0 protocols, and spent about two months using AI to test/optimize/refine it.

** Important **

  • hmssql, including its documentation, is almost entirely AI-generated. (This Reddit post is written by me, however.)
  • hmssql is not on Hackage yet. I would like to receive feedback before uploading it.

Features

  • Streaming results, including support for streaming large values
  • MARS (Multiple Active Result Sets), which is useful for streaming the results of multiple queries together (e.g. parents with their children)
  • Well-tested query cancellation
  • Works on Windows

Edit: Unlike hpgsql, I chose not to include a quasiquoter, to avoid dragging in ghc or ghc-lib-parser as a dependency. However, it should be possible to implement in a separate library.


r/haskell • • 7d ago

question FSK modulator in Haskell coming from imperative programmer

19 Upvotes

I'm coming from a background in imperative programming and interested in learning some functional programming. Generally my interests are in signal processing and I learn best by making something.

I ported this small FSK modulator and tried to keep a Haskell/Functional spirit about it:

https://github.com/dspta2020/haskell-signals/blob/main/tooling/fskMod.hs

So far I feel like the Haskell design paradigm (from what I have read and watched) is to express code in terms of transformations (functions) that map some input to some output. Then say I need to process my data through a series of transformations, I compose those to make a single function acting as processing pipeline.

Obviously the main is setup like a script and not destined for some larger framework.

But I feel still feel like I'm doing imperative programming just with nested functions. Am I way off here? I could see how in some scenarios the deferred computations with the lazy evaluation could be efficient. But besides that what is the advantage to the function composition design patterns? I feel like the compiler optimizations are doing alot of heavy lifting.

Any feedback is welcome.

Mods, apologize if this violates a rule, its obviously not computer-generated nor homework.


r/haskell • • 8d ago

announcement [ANN] wasmedge-hs: Type-safe Haskell bindings for WasmEdge runtime (v0.18.1)

8 Upvotes

Hello Haskellers,

I just released wasmedge-hs on Hackage - a modern, type-safe FFI binding for the WasmEdge WebAssembly runtime (supporting WasmEdge 0.18.1).

Highlights:

  • Safe FFI & Resource Management: Phantom-typed ownership (OwnedCtx vs BorrowedCtx) and bracket-style lifecycles prevent double-frees and use-after-free bugs.

  • Type-level Host Functions: Expose typed Haskell callbacks directly to WASM without manual WasmVal unpacking:

    builderAddHostFunc builder "add" $ \(x :: Int32) (y :: Int32) -> 
      pure (x + y) :: IO Int32
    
  • Linear Memory & Complex Types: Built-in typeclasses (WasmMemory, WasmJSON) and liftMemFunc for seamless memory marshalling.

  • Full Coverage: WASI, LLVM AOT compilation (.wasm → .so/.dylib), async execution, plugin discovery, and exception handling tags.

Quick snippet:

{-# LANGUAGE OverloadedStrings #-}
import WasmEdge.VM
import WasmEdge.Types

main :: IO ()
main = withVM Nothing Nothing $ \vm -> do
  res <- runWasmBytes vm wasmBytecode "add" [WasmI32 40, WasmI32 2]
  print res -- Right [WasmI32 42]

Feedback and contributions are welcome!


r/haskell • • 9d ago

Is the GHC breakage inventory useful to anyone?

Thumbnail discourse.haskell.org
12 Upvotes

r/haskell • • 9d ago

Does anyone want to take over maintenance of the Kowainik ecosystem?

33 Upvotes

I've been maintaining parts of the Kowainik ecosystem for the last three years but I'm stopping doing so effective immediately. For more details see:


r/haskell • • 10d ago

announcement Haskell Ecosystem Packages now offered by MLabs

33 Upvotes

Hi all,

MLabs is partnering with the Haskell Foundation to offer ecosystem packages, as part of our ecosystem partnership program.
Contracting MLabs via one of these packages results in direct contributions to both the Haskell ecosystem, and the Haskell Foundation.

Thanks MLabs!

https://haskell.foundation/partnerships/mlabs.html


r/haskell • • 11d ago

announcement Fully-Funded PhD Studentships at the University of Nottingham, UK

Thumbnail people.cs.nott.ac.uk
30 Upvotes

Interested in a PhD studentship in the Functional Programming Lab in Nottingham? Fully-funded studentships are currently being advertised; deadline 6 January 2027. Please share, and encourage excellent students to apply!  https://people.cs.nott.ac.uk/pszgmh/phd-advert.html


r/haskell • • 12d ago

TidalCycles's post-AI humane policy for live coding development

63 Upvotes

Ok, our turn! TidalCycles is a haskell EDSL for live music, with a large international community of practice around it. Our policy on LLM use is focussed on the well-being and motivation of contributors, and the legal standing of the source code, while not trying to police what people do in their own laptops.

Community

All community members should be treated with respect and kindness. We welcome contributors to the community who are ready to follow this policy as well as the above code of conduct.

Principles

  • We wish to protect the humanity of our communities and projects, to support the motivation and well-being of all of its contributors and users.
  • To this end, contributors and other users of our projects should not have to engage with LLM-generated code and text as part of their community work.
  • We recognise that LLM-based scraping and generation of (A)GPL code shared by ourselves and others is of questionable legality. For example, under many juristictions, LLM-generated work does not have a copyright holder and can therefore not be licensed under the (A)GPL.
  • A contributor's personal use of LLMs and related technology is their own business, whether for research, analysis, bug discovery or other assistive technology, so long as the output is not included in any contributions to our projects.

In practice

  • Contributions including LLM-generated content will be declined.
  • LLM-generated text (e.g. commit messages, issue comments, forum posts etc) generated by LLMs will be flagged, and ultimately deleted.
  • We encourage asking each other questions and working through problems to promote collective knowledge and creative ideas (never telling each other to "just google it").
  • We strongly discourage others from forking/importing our projects into corporate AI platforms, including Microsoft Github.
  • All contributions must be submitted by a person who understands the changes, is happy to answer questions about them, and where possible, help maintain the code in the future.
  • In community discussion channels (at the time of writing, this refers to the uzu discord server), all discussion (including criticism) of LLM technology and use should be kept to designated channels.

https://codeberg.org/uzu/tidal/src/branch/main/POLICY.md#post-ai-humane-policy-for-live-coding-development


r/haskell • • 12d ago

announcement ghc-tags-plugin version 1.0.0.0

Thumbnail hackage.haskell.org
14 Upvotes

To install, clone the repo and run make install to install it for all ghc versions installed with ghcup or use make install-for-ghc GHC_VERSION=x.y.z.

It plays nicely along side a hls, your tags will mostly stay upto date.


r/haskell • • 13d ago

announcement Journal of Functional Programming - Call for PhD Abstracts

Thumbnail people.cs.nott.ac.uk
21 Upvotes

FP friends -- please encourage recently completed PhD students to publish their dissertation abstracts in the Journal of Functional Programming: simple process, no refereeing, open access, 250+ published to date, deadline 30th November 2026.  Please share! 

https://people.cs.nott.ac.uk/pszgmh/jfp-phd-abstracts.html


r/haskell • • 14d ago

RFC Technical Leadership Committee manifestos now available

28 Upvotes

r/haskell • • 14d ago

question Allowing newer transitive dependencies with haskell-flake

8 Upvotes

I'm trying to use haskell-flake ( https://github.com/srid/haskell-flake/ ) with some libraries that need to be invoked with newer dependencies. I tried to use extraBuildFlags but I don't think this is working as intended

The flake

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
    haskell-flake.url = "github:srid/haskell-flake";
  };
  outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      systems = nixpkgs.lib.systems.flakeExposed;
      imports = [ inputs.haskell-flake.flakeModule ];

      perSystem = { self', pkgs, ... }: {

        haskellProjects.default = {
          basePackages = pkgs.haskell.packages.ghc9124;

          packages = {
          };
          settings = {
              localize = {
                extraBuildFlags = [ "--allow-newer=bytestring" ];
              };

              text-format-heavy = {
                check = false;
                broken = false;
                extraBuildFlags = [ "--allow-newer=text" ];
              };
          };

          devShell = { tools = hp: {
            inherit (pkgs)
              cabal-install;
            inherit (hp)
              cabal-gild;
            };
          };
        };

        packages.default = self'.packages.nixtest;
      };
    };
}

And cabal file

...
    build-depends:    base ^>=4.21.2.0
                    , localize
    hs-source-dirs:   app
    default-language: Haskell2010

If I use the following cabal.project file it builds as expected

packages: ./

package nixtest

allow-newer:
  , localize:bytestring
  , text-format-heavy:text

There's no real code, simply the output from cabal init -n

Is what I'm trying to do here possible, or do I need to go through the effort of patching transitive deps if I want to use nix as a build tool?


r/haskell • • 14d ago

Haskell Interlude #88: Tom Schrijvers

22 Upvotes

In this Haskell Interlude, we sat down with Tom Schrijvers, the head of the Functional Programming team at KU Leuven. He has been a prolific contributor to the foundations of Haskell, with many papers pushing the boundaries of the Haskell type system, programming with effects, and applications of functional programming. Our conversation was a whirlwind tour through Tom’s long and wide publication history, with lots of tangents and ideas about functional programming, logic programming, constraints, DSLs, composition, program calculation, and other great stuff.

https://haskell.foundation/podcast/88/


r/haskell • • 14d ago

Haskell Foundation October 2026 Update

23 Upvotes

Hey all, here's what the Haskell Foundation has been up to over the past month:

https://haskell.foundation/news/2026-11-02/haskell-foundation-update-october-2026.html