| 1 | (* Procedures that only return, for Inline: imported, one reading a |
| 2 | variable this module hides, one calling a generic module's. *) |
| 3 | module Inl; |
| 4 | import Box := Cell(INT); |
| 5 | |
| 6 | var hidden: INT; |
| 7 | |
| 8 | proc twice*(x: INT): INT; |
| 9 | begin |
| 10 | return 2 * x; |
| 11 | end; |
| 12 | |
| 13 | proc plusHidden*(x: INT): INT; |
| 14 | begin |
| 15 | return x + hidden; |
| 16 | end; |
| 17 | |
| 18 | proc boxed*(x: INT): INT; |
| 19 | begin |
| 20 | return Box.add(x, 1); |
| 21 | end; |
| 22 | |
| 23 | begin |
| 24 | hidden := 100; |
| 25 | end Inl. |