haskell.{compiler,packages}.microhs: init at 0.15.4.0#460845
Conversation
3bcd094 to
f3d6a88
Compare
f3d6a88 to
7bf6633
Compare
041e3ef to
97260bc
Compare
steeleduncan
left a comment
There was a problem hiding this comment.
Could I ask what the reasoning for all the revision-versioned microhs packages is?
I know it is done with GHC, but that is an outlier for nixpkgs. With e.g. gcc, clang, go, etc there are only packages for the major versions with (deliberately) backwards incompatible changes
steeleduncan
left a comment
There was a problem hiding this comment.
If this is a fix to another commit in this PR it should be merged with that commit (ie the initial haskell.{compiler,packages}.microhs-*: init commit)
|
Since 0.14.17.0, Would that count as "a fix to another commit"? I'm not sure. |
For now, it is solely about making the versions available. There is no particular reason. If you think that only having the latest version would be better, that is doable, but it will require bumping the boot compiler, and therefore also the Hugs compatibility patch, more frequently. Perhaps we should check with upstream what the versioning policy is, if any? |
|
Looking at the MicroHs repo, there are 15 tags/versions in the last 3 months. Keeping up with a version a week would be a significant maintenance burden, and eventually that number of extra derivations would noticeably affect evaluation and rebuild times. When old versions of programming languages are supported in Nixpkgs, they tend to get removed when there is no further support (e.g. node.js < 20 is gone now). There doesn't seem to be any intention of support for the old MicroHs versions, so I think having just the latest version would be appropriate here.
It would make sense. I don't think a programming language with weekly breaking changes could ever be useful, but it would be useful to know if the intentions is for an occasional major version upgrade with breaking changes |
Possibly I am misunderstanding, but the oldest version of the compiler supported by this PR is 0.14.17.0, so if |
|
There is 0.14.15.0, which will fail with the fix. But that only matters if I don't update the Hugs patch to 0.14.25.0 as I look into dropping the older versions. |
Atemu
left a comment
There was a problem hiding this comment.
If there is no specific need for other versions, I see no reason to keep them.
I propose we strive for the least amount of mhs compilers possible to complete bootstrap to the newest one.
Ideally, this would be 1 but that's unrealistic.
I could see a chain like this though:
- hugs-compatible mhs ran/built via hugs
- mhs that can build latest
- latest mhs
|
|
||
| inherit (microhs-src) src; | ||
|
|
||
| patches = [ patches/hugs.patch ]; |
There was a problem hiding this comment.
Why is this a vendored patch rather than just fetching the upstream hugs branch?
There was a problem hiding this comment.
The upstream hugs branch is not kept up-to-date.
We might be able to use the ancient version if we patch out all the newer primitives, but I expect that it would only get less compatible over time.
There was a problem hiding this comment.
I see.
If you're going to do that work anyway though.. why not just do it upstream?
There was a problem hiding this comment.
The patch mostly replaces uses of ViewPatterns with isJust. It's not pretty code, but I could ask upstream.
There was a problem hiding this comment.
Patch looks okay to maintain since it's not that deep. I wouldn't expect the ViewPatterns stuff to be merged because it is ugly code often enough.
We could try to upstream some of this though, e.g. what about adding a HUGS cpp definition which handles all the removal e.g. of the NFData stuff, seqs and interactive mode?
There was a problem hiding this comment.
e.g. what about adding a HUGS cpp definition which handles all the removal
I'd prefer to avoid CPP because it would complicate the bootstrap (mhs doesn't require CPP).
That said, I will see what I can do.
There was a problem hiding this comment.
All changes except for the ViewPatterns fixes, without CPP: augustss/MicroHs#429.
b7a6273 to
4100f81
Compare
|
I get the following when building hscolour which I thought would be a nice test case for a non trivial executable? |
|
I've noticed while going through your comments that the current version is a breaking change ( |
|
I already did that in eeb3e9b, though we may want to make it an actual alias that can be deprecated later? |
4f00894 to
dfb6e23
Compare
dfb6e23 to
b233c6e
Compare
The package set is built entirely from source using the stdenv and Hugs. This also replaces the recently added microhs package, which was built from pre-generated compiler output. Co-authored-by: sternenseemann <sternenseemann@systemli.org>
f570913 to
8fbef80
Compare
Test the GHC boot packages that are known to work with MicroHs and mark those that don't work as broken.
Packages that have an empty hydraPlatforms won't be tested on Hydra otherwise, even if explicitly requested.
8fbef80 to
ee2751c
Compare
This makes isNativeBignumGhc purely textual again after NixOS#460845. Could improve performance in the right conditions, but most importantly solves eval issues with aliases allowed (due to the throw-ing ghc attributes) without resorting to tryEval.
This makes isNativeBignumGhc purely textual again after NixOS#460845. Could improve performance in the right conditions, but most importantly solves eval issues with aliases allowed (due to the throw-ing ghc attributes) without resorting to tryEval.
This makes isNativeBignumGhc purely textual again after NixOS#460845. Could improve performance in the right conditions, but most importantly solves eval issues with aliases allowed (due to the throw-ing ghc attributes) without resorting to tryEval.
This change adds microhs-based packagesets to the
haskell.packagespackage sets.For example,
haskell.packages.microhs.mtlis a working microhs-compiledmtlpackage.The microhs compilers added here replace the recently added
microhspackage.Unlike the previous version, all new versions are built entirely from source by using Hugs to interpret the microhs source code.
cpphs was also booted from source in a similar way.
The goal is to allow Nixpkgs users to more easily experiment with using microhs, and perhaps one day boot GHC from source.
Note, however, that
nix-shell(and related derivations) is completely untested.A few patches were needed to make microhs and microcabal behave properly inside the Nix store, all of which I will seek to upstream.
The patch to make microhs Hugs-compatible is more of a hack, and I expect keeping microhs Hugs-compatible to be too troublesome to be worth upstreaming.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.