2 ms·
Wouldn't that better be: addPtr :: Address (presize : Nat, size : Nat) -> (x : Fin size) -> Address ( presize + x, size - x) presize = number of 'slots' ava
by Someone 15y ago
Wouldn't that better be:
addPtr :: Address (presize : Nat, size : Nat) -> (x : Fin size) -> Address ( presize + x, size - x)
presize = number of 'slots' available before the current value.
size = number of 'slots' available after the current value.
That would allow for later subtraction, too.
- Peaker 15y agoYes, indeed :-) I did not mean to write an actual implementation, just to make a small point. In an actual implementation, I'd probably want the type to convey information about the content stored at the address, too.