microhs: init at 0.14.21.0 - #458599
Conversation
|
Re-running CI due to a since-fixed unrelated treefmt-nix failure |
|
acid-bong
left a comment
There was a problem hiding this comment.
the rest (except for the test, i don't know Haskell enough to check it) looks great
wolfgangwalther
left a comment
There was a problem hiding this comment.
Except for the unused input, LGTM.
Thank you :)
Pull Request is not mergeable
|
Why are we redundantly packaging MicroHs?
|
|
The reasoning in the PR body says that this is bootstrapped without GHC, just from a C compiler. That would be the reason, I guess? I thought it was a good one - if you think otherwise and think we should not do that, we can revert instead. |
|
Yes, my reason was that this packages builds a Haskell interpreter/compiler without GHC or any part of that ecosystem. Functionally the resulting binary should be the same as provided by |
|
That seems fine, though I must say that I don't find it much more compelling than using GHC given that the origin of mhs is just a generated C file. Without being able to build packages using mhs, this doesn't really move anything forward, though we can develop this in the future. W.r.t. bootstrapping, using hugs would be much more interesting and as far as I know, @AlexandreTunstall has worked on that already. |
|
Yes, that is true. That C file is a blob of SKI combinators, which aren't very auditable. I'm working on a patch to the derivation to bootstrap that C file using Hugs When you mention bootstrapping via hugs, I assume you mean bootstrapping GHC though? That would be great! |
|
As great as it would be to bootstrap GHC via Hugs, that's something nobody has managed to do yet. MicroHs via Hugs, on the other hand, is quite easy and I already have a working version that first needed #443281 merged. You can expect a PR soon (once I rebase my branch to overwrite this drv 🙃). @steeleduncan I assume you would like me to leave you in the package maintainer list? |
Is also what I meant! |
|
@AlexandreTunstall I was working on doing the same, but ran into the build problem with You are more than welcome to remove me from maintainers list, I don't mind either way To avoid any duplication of efforts, what are your plans with MicroCabal? Once MicroHs was properly bootstrapped my plan was to use that in a MicroCabal derivation that doesn't rely on the prebuilt blob in the MicroHs repository. That would probably require a wrapper or an upstream patch for MicroCabal though as it doesn't have a equivalent of |
I'm not sure what the trouble is, because I have a usable source-built MicroCabal in #460845, though it admittedly did need a bit of patching. |
| hello-world = callPackage ./test-hello-world.nix { microhs = finalAttrs.finalPackage; }; | ||
| }; | ||
|
|
||
| meta = { |
There was a problem hiding this comment.
Given that this is "built" from generated code that has equivalent properties to bytecode, could you set the appropriate sourceProvenance?
It'd also be great if the description mentioned the purpose/difference of this package.
There was a problem hiding this comment.
This formula has been superseded now in #460845 which bootstraps without the generated blob using hugs (recently fixed in nixpkgs)
Once that is merged this will be deleted, so I wasn't planning on making any changes to this formula
There was a problem hiding this comment.
I'd prefer this to be done regardless as it's not certain when/if that PR is merged.
There was a problem hiding this comment.
I see no reason it shouldn't be merged, and that PR is a superior approach to this one, so I'd rather contribute to it to help get it over the line!
MicroHS is a Haskell compiler and interpreter
This exists as an autogenerated haskell package
haskellPackages.MicroHs, but this package builds it independently of GHC, using the bootstrap functionality to build it from just a C compiler. This gives an alternate, easily auditable, lightweight haskell compiler and interpreter, that does not rely on the GHC toolchain at allThings done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.