!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

716 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org144 Servers

Load older messages


SenderMessageTime
7 Sep 2025
@emilazy:matrix.orgemilyjust a more portable blob one21:23:27
@emilazy:matrix.orgemilysince you still must go through an unauditable machine-generated C file to start with21:23:52
@emilazy:matrix.orgemilymaybe someone could implement an interpreter to run MicroHs to start it off though 🫠21:24:16
@emilazy:matrix.orgemily

https://www.joachim-breitner.de/blog/802-More_thoughts_on_a_bootstrappable_GHC

https://elephly.net/posts/2017-01-09-bootstrapping-haskell-part-1.html

21:25:12
@emilazy:matrix.orgemilysome background reading for anyone considering embarking on this task21:25:25
@alex:tunstall.xyzAlex
In reply to @emilazy:matrix.org
the sad thing about MicroHs is that AFAICT it won't offer a true from-source bootstrap
Why not?
It runs fine under Hugs. I've already gotten that working.
21:28:07
@emilazy:matrix.orgemilythat's promising then21:28:22
@emilazy:matrix.orgemilyalthough it also means maintaining Hugs to keep it working with newer C compilers :)21:28:45
@emilazy:matrix.orgemilybut might not be too bad21:28:58
@emilazy:matrix.orgemilythe Discourse post I linked implies to me that extensions like implicit parameters are WONTFIX, so there may be politics involved in getting GHC to stop using extensions that MicroHs doesn't want21:29:48
@alex:tunstall.xyzAlexI'd rather avoid it, but forking or preprocessing to handle such extensions isn't out of the question.21:30:43
@emilazy:matrix.orgemilydoes Hugs even work on x86-64? 🤔21:30:55
@emilazy:matrix.orgemilythat's a pretty large indefinite future workload IMO21:31:14
@emilazy:matrix.orgemilyunless you just accept the bootstrap chain getting longer and longer forever21:31:30
@emilazy:matrix.orgemilywhich has big issues itself21:31:36
@alex:tunstall.xyzAlexPotentially, yes, which is mostly why I'd rather not.21:31:38
@emilazy:matrix.orgemilye.g. it messes up easy bootstrap of new architectures21:31:46
@emilazy:matrix.orgemilysince now you have to backport codegen to every version21:31:59
@alex:tunstall.xyzAlexDefinitely trying to keep the chain as short as possible, but there is always unregisterised GHC if absolutely necessary.21:32:34
@emilazy:matrix.orgemilyyeah21:32:58
@emilazy:matrix.orgemilyhave you talked with Lennart about this?21:33:14
@emilazy:matrix.orgemilyit would certainly be cool to see21:33:19
@emilazy:matrix.orgemilydid you have to patch it for Hugs support?21:33:28
@emilazy:matrix.orgemilyif you could get bootstrap via Hugs upstreamed to MicroHs and ensure that Hugs builds okay with modern C compilers, then I wonder what it would take to Hugs -> MicroHs + MicroCabal added as an option for the Nixpkgs Haskell package set. (where presumably very little would work, but it would at least be tantalizing incentive to working on closing the gap between that and GHC)21:36:12
@maralorn:maralorn.demaralorn

What are my old and tired eyes seeing?

┃        > Encountered missing or private dependencies:
┃        >     cabal-add >=0.1 && <0.2 (installed: 0.2)

Look at the installed. I have been wishing for that feature for years and have been procrastinating to implement it basically the same time.

21:36:26
@maralorn:maralorn.demaralornThis is amazing.21:37:05
@alex:tunstall.xyzAlex
In reply to @emilazy:matrix.org
did you have to patch it for Hugs support?
Nope, this is already something Lennart has sorted out.
Though I did, amusingly, have to patch Hugs because it was broken in the Nixpkgs commit I started from (someone else wrote that patch, so no effort on my part).
21:38:44
@alex:tunstall.xyzAlex
In reply to @emilazy:matrix.org
have you talked with Lennart about this?
I don't think so, but I will try and upstream whatever improvements/fixes I make along the way.
(And I expect there to be a lot.)
21:39:19
@emilazy:matrix.orgemilywell AIUI the upstream build system either compiles the C blob or uses GHC right?21:43:23
@emilazy:matrix.orgemilyso adding a path to bootstrap via Hugs would be a good step21:43:36

Show newer messages


Back to Room ListRoom Version: 6