Haskell
Haskell is a functional programming language that can be used for operating system development.
This page won't describe the pros and cons or the features of using Haskell for kernel development. Just like with most other languages, you still require some assembly to jump into your Haskell code.
Getting started
The most popular method though has been to use a small C or assembly microkernel, and use Haskell to implement the servers.
Being a functional programming language, it may be hard to adapt a lot of example code written in imperative languages, therefore a heavy theoretical understanding of operating systems and the concepts involved is required. That being said, you're not completely alone; try Googling for "Haskell on Bare Bones", and more general terms such as "Functional Languages in Operating Systems".
Compilers
The Glasgow Haskell Compiler is the recommended compiler for Haskell. GHC can output executables (though perhaps not in all of the Executable Formats required), assembly, byte code, Core, object files, LLVM (and possibly Clang depending, on the host OS) executables, C--, and finally ANSI C code (which you can send through your favorite C compiler, such as GCC). Caveat emptor: the C output from GHC is highly obfuscated, as it hard-codes stack and heap management, and essentially consists of many small, inter-connected procedures (spaghetti code).
Operating Systems in Haskell
See Also
External links
- Haskell homepage
- Haskell Wiki
- Learn You a Haskell for Great Good! - Haskell tutorial for beginners
- Real World Haskell - a more through introduction to Haskell
- Wikipedia article on Haskell
- C-- - Not to be confused with Sphinx C--, it is one of the IRs used by GHC, which was later forked into Cmm
- Calling Haskell from C
- Calling C from Haskell
- GHC Documentation - GHC Backends
- The Haskell 98 Foreign Function Interface
- A Principled Approach to Operating System Construction in Haskell