haskus-system
haskus-system copied to clipboard
build on 9.2+
Related to https://github.com/haskus/packages/issues/53
Trying to build haskus-system
on 9.8.1, in https://github.com/haskus/haskus-system/blob/master/haskus-system/src/lib/Haskus/Arch/X86_64/Linux/Syscall.hs, I'm seeing many errors such as
src/lib/Haskus/Arch/X86_64/Linux/Syscall.hs:95:56: error: [GHC-83865]
• Couldn't match expected type ‘Int64#’ with actual type ‘Int#’
• In the first argument of ‘I64#’, namely ‘r’
In the expression: I64# r
In the expression: (# s1, I64# r #)
The question is: Should I coerce the Int64#
s into Int#
s in the body and signature of the functions on the haskell side, or simply update the foreign import to use Int64#
s directly ? The latter seems much more sane, given the guest architecture is always going to be x86_64 when using the module, and Int#
is (presumably) host-dependent.
(this also raises questions about the updates I did in Haskus.Binary
- whether those shouldn't have all been coerced to Int64#
or Word64#
by default rather than Int#
/Word#
, but I'm not sure if that functionality isn't used somewhere else where my assumptions fail.)
Well, the hello world works with my dubious changes, it even tries to shut down my computer.
reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF) = -1 EPERM (Operation not permitted)
https://github.com/haskus/haskus-system/compare/master...pillowtrucker:haskus-system:testing-system-build?expand=1
Closing as I'll archive this repository (the code has been moved into https://github.com/haskus/packages)