package mirage-types

  1. Overview
  2. Docs

doc/mirage-types/Mirage_types/index.html

Module Mirage_typesSource

MirageOS Signatures.

This module defines the basic signatures that functor parameters should implement in MirageOS to be portable.

General conventions

  • errors which application programmers are expected to handle (e.g. connection refused or end of file) are encoded as result types where Ok x means the operation was succesful and returns x and where Error e means the operation has failed with error e. The error e uses the Rresult.R.msg type for the most general error message, and possibly more specific ones depending on the interface.
  • errors which represent programming errors such as assertion failures or illegal arguments are encoded as exceptions. The application may attempt to catch exceptions and recover or simply let the exception propagate and crash the application. If the application crashes then the runtime system should output diagnostics and abort.
  • operations which perform I/O return values of type +'a io which allow the application to either wait for the I/O to be completed or leave it running asynchronously. If the I/O completes with an error then the operation may have completely failed, partially succeeded or even completely succeeded (e.g. it may only be a confirmation message in a network protocol which was missed): see individual API descriptions for details.

Release v3.6.0

Sourcemodule type DEVICE = Mirage_device.S

Time and clock devices

Sourcemodule type TIME = Mirage_time.S
Sourcemodule type MCLOCK = Mirage_clock.MCLOCK
Sourcemodule type PCLOCK = Mirage_clock.PCLOCK
Sourcemodule type RANDOM = Mirage_random.S

Connection between endpoints

Sourcemodule type FLOW = Mirage_flow.S

Console

Sourcemodule type CONSOLE = Mirage_console.S

Sector-addressible block devices

Sourcemodule type BLOCK = Mirage_block.S
Sourcemodule type NETWORK = Mirage_net.S
Sourcemodule type ETHERNET = Mirage_protocols.ETHERNET
Sourcemodule type IP = Mirage_protocols.IP
Sourcemodule type ARP = Mirage_protocols.ARP
Sourcemodule type IPV4 = Mirage_protocols.IPV4
Sourcemodule type IPV6 = Mirage_protocols.IPV6
Sourcemodule type ICMP = Mirage_protocols.ICMP
Sourcemodule type ICMPV4 = Mirage_protocols.ICMPV4
Sourcemodule type UDP = Mirage_protocols.UDP
Sourcemodule type TCP = Mirage_protocols.TCP
Sourcemodule type STACKV4 = Mirage_stack.V4
Sourcemodule type CHANNEL = Mirage_channel.S

Static Key/value store

Sourcemodule type KV_RO = Mirage_kv.RO
Sourcemodule type KV_RW = Mirage_kv.RW

Filesystem devices

Sourcemodule type FS = Mirage_fs.S