blob: 7adf092222c17b0cf5db9b02aadc038b3a34eb89 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
-- [external]: templates for the external functions.
import Base
import External.Types
open Primitives
open external
-- TODO: fill those bodies
/- [core::mem::swap] -/
def core.mem.swap
(T : Type) : T → T → State → Result (State × (T × T)) :=
fun x y s => .ok (s, (y, x))
/- [core::num::nonzero::NonZeroU32::{14}::new] -/
def core.num.nonzero.NonZeroU32.new :
U32 → State → Result (State × (Option core_num_nonzero_non_zero_u32_t)) :=
fun _ _ => .fail .panic
|