The design and implementation of an operating system in a functional language (miranda)