Automatic Hugs bootstrapping
Automate the process of Bootstrapping MicroHs with Hugs.
Have the Makefile automatically pull the patched version of MicroHs to build with Hugs, then use the patched version MicroHs to build the current tree.
Why does this PR remove a number of files in the hugs/ directory? I want those files.
Well, you can only build MicroHs with Hugs in the hugs branch, so these files are useless in the master branch. I figured it would make more sense to only keep them in the hugs branch exclusively.
I want them in the master branch. I regard having a hugs branch as a temporary measure. It should be feasible to hack Hugs to have pattern guards and the the hugs branch can go away.
There's a partial blocker for me. The current hugs branch (4a85b7204627f3ad76d463fe383259821eec755b) doesn't build on my machine, but the commit I specified e43e3cf30499e34da167384e8f26410e95e42648 works fine.
Does it crash with an overflow message? My Hugs patch fixes that. I can build with the current hugs branch using that patch. There is UB somewhere in Hugs. ☹️
Does it crash with an overflow message? My Hugs patch fixes that. I can build with the current hugs branch using that patch. There is UB somewhere in Hugs. ☹️
Yes.
$ make bin/hmhs
runhugs '+Phugs:src:paths:{Hugs}/packages/*:hugs/obj' -98 +o +w -h100m hugs/Main.hs -i -imhs -isrc -ilib -ipaths MicroHs.Main -ogenerated/hmhs.c
Program error: arithmetic overflow
make: *** [Makefile:285: generated/hmhs.c] Error 1
I'm on Debian 12 and I'm using their hugs package.
Package: hugs
Version: 98.200609.21-6+b1
...
That error comes and goes. My patch replaces it with a warning.
Okay, I'll take your word for it. I updated the commit to point to the current hugs branch's hash.
Okay, I can confirm the patched version of Hugs allows it to build on my (linux) machine.
I will revisit this later.