switch to tail -f circular pipes
[jackhill/mal.git] / ada.2 / types-atoms.ads
1 with Garbage_Collected;
2
3 package Types.Atoms is
4
5 type Instance (<>) is abstract new Garbage_Collected.Instance with private;
6
7 -- Built-in functions.
8 function Atom (Args : in T_Array) return T;
9 function Deref (Args : in T_Array) return T;
10 function Reset (Args : in T_Array) return T;
11 function Swap (Args : in T_Array) return T;
12
13 -- Helper for print.
14 function Deref (Item : in Instance) return T with Inline;
15
16 function With_Meta (Item : in Instance;
17 Metadata : in T) return T;
18 function Meta (Item : in Instance) return T;
19
20 private
21
22 type Instance is new Garbage_Collected.Instance with record
23 Data : T;
24 F_Meta : T;
25 end record;
26
27 overriding procedure Keep_References (Object : in out Instance) with Inline;
28
29 end Types.Atoms;