by Mathnerd314 · 9y ago · 0 comments
I've read https://github.com/haskus/haskus-system/blob/27bc422fccff455... and it still seems pretty weird to store the syscalls at type-level instead of defining them function-by-function. You don't have to define functions one-by-one, just use Template Haskell to generate them... and Syscall.read is much clearer than syscall @"read".
I did this to remove the boilerplate code, to make it easier to select the method (foreign primops or safe FFI foreign calls) and to make the conversion from the kernel tables simpler.
However I may have to switch to a Template Haskell solution because the type-level approach with type classes and type families has increased the compilation time and forces me to use `-freduction-depth=0`.