diff options
-rw-r--r-- | mu.md | 5 | ||||
-rw-r--r-- | tutorial/index.md | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/mu.md b/mu.md index 7cd5959c..f4438bde 100644 --- a/mu.md +++ b/mu.md @@ -436,7 +436,7 @@ Shifting bits right inserts zeros on the left by default. A _signed_ shift right duplicates the leftmost bit, thereby preserving the sign of an integer. -## More complex instructions on more complex types +## Operations on more complex types These instructions work with any type `T`. As before we use `/reg` here to indicate when a variable must live in a register. We also include type @@ -605,7 +605,7 @@ type point { } ``` -Mu programs are currently sequences of `fn` and `type` definitions. +Mu programs are sequences of just `fn` and `type` definitions. Compound types can't include `addr` types for safety reasons (use `handle` instead, which is described below). They also can't currently include `array`, `stream` @@ -643,4 +643,3 @@ You can shallow-copy compound types using the `copy-object` function: ``` copy-object src: (addr T), dest: (addr T) ``` - diff --git a/tutorial/index.md b/tutorial/index.md index cea31945..aa803d98 100644 --- a/tutorial/index.md +++ b/tutorial/index.md @@ -300,11 +300,11 @@ Write a function to perform this conversion. Some starting points: * Read [the section on floating-point arithmetic](https://github.com/akkartik/mu/blob/main/mu.md#floating-point-arithmetic). * One wrinkle is that the x86 instruction set doesn't permit literal fractional arguments. So you'll need to _create_ 1.609 somehow. See the - sub-section on moving values around under [operations on simple types](https://github.com/akkartik/mu/blob/main/mu.md#operations-on-simple-types). + section on moving values around under [operations on simple types](https://github.com/akkartik/mu/blob/main/mu.md#operations-on-simple-types). This task has four source files in the repo that reveal more and more of the answer. Start from the first, and bump down if you need a hint. -- tutorial/task8.mu -- tutorial/task8-hint1.mu -- tutorial/task8-hint2.mu -- tutorial/task8-hint3.mu +* tutorial/task8.mu +* tutorial/task8-hint1.mu +* tutorial/task8-hint2.mu +* tutorial/task8-hint3.mu |