
Hi Alexis, Sorry you couldn't post originally, perhaps you need to join the list first?
I am an MSc student working on the development of a Haskell system for use with the Lego Mindstorms NXT (My intent is to port it using the GCC-ARM toolchain and get it running with the NXT firmware). For the most part I need a Haskell compiler that will run within the 256KB memory space. YHc seems like it could be perfect for such an application, but I am curious about the following:
- Is YHc VM based? Or can it compile Haskell directly to C code, or both, or some intermediate code?
It compiles to a bytecode, which you execute using a C interpreter.
- What is the typical memory footprint of the compiler/programs?
The programs are small. The interpreter can be made quite small. The compiler is in the region of 5Mb, and would be impractical for running on the Lego machine, and should be unnecessary. You will probably find that porting Yhc is a lot easier, and the binaries are smaller - if I had to pick between GHC and Yhc for this task I'd choose Yhc. That said, 256kb is probably the lower end of what you can squeeze Yhc into. You may need to look at removing features like libgmp and ffi - Tom is probably in a better position to give you a minimum size. Thanks Neil