Except I forgot to change the type of the array:
data Capability = Capability {
id :: UInt64,
facet :: UInt16
}
data ObjectHeader = ObjectHeader {id :: UInt64}
data Process = Process {cap_node :: ArrayN Capacity 32}
data Node = Node {...}
data ObjectBody = P Process | N Node
data Object = Object {
head :: ObjectHeader,
body :: ObjectBody
}
data Global {
obj_table :: ArrayN Object Size,
running :: Process
}
kernel_msg_send cap_idx msg = let cap = global.running.cap_node[cap_idx] in
let obj = lookup(global.obj_table, cap.id) in case body(obj) of
(P process) -> ...
(N node) -> ...
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev