[Haskell] A road for Haskell into the kernel of a full-fledged OS
weel at ugcs.caltech.edu
Fri Jun 16 11:27:32 EDT 2006
> It is irreleveant what language these services are written in, so
> long as they obey the protocol.
This is most likely true. I have written an interface using the OCaml
FFI to be able to call the MINIX message passing functions from within
an OCaml program. It's doesn't work completely just yet, but most of
it's there. One practical problem is that the "protocol" is not
specificied clearly or in a single place.
Currently, I can use the message passing interface from OCaml to
perform system calls from user processes. In particular, I have
implemented a rudimentary kill(1) utility that uses the message
passing interface directly, without going through the C library kill()
I have not yet written a working device driver using my interface,
but last night I got a lot closer to catching the last bug...
> Some of Andrew Tanenbaum's students are interested in re-writing
> some of Minix3 OS services (like device drivers or file systems,
> currently written in C) in Ocaml and Cyclone.
That would be me. The project page is at
I would also be interested in using Haskell. I wrote a little compiler
(for the BlooP/FlooP language from Hofstadter's "Goedel, Escher,
Bach") in Haskell last year for a project supervised by Mike Vanier
when I was an undergrad at Caltech. You can find it somewhere on my
I like Haskell a lot, but I chose to use OCaml for this work because
the practicalities of porting the compiler were a little easier to
manage. GHC would be rather harsh on the fairly primitive MINIX memory
management system, although I must admit I have not yet tried to port
Haskell to MINIX, so this is purely a conjecture.
The current version on the project page only works with MINIX from
CVS. I could make it work with 3.1.2, but then it would stop working
with the CVS version. This is because the interface files have to
duplicate some information about the kinds of messages that exist and
what their tags are, which must be synchronized with the OS's idea of
what the tags mean.
More information about the Haskell