summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-02-01 23:08:46 -0800
committerOri Bernstein <ori@eigenstate.org>2017-02-01 23:08:46 -0800
commit78c19177f70b9b5c798e815c34e63aa3634214f1 (patch)
tree664e65c0d612b62768efe79f3c4ac794106b42c5 /doc
parentc307d63f28ceab7201fb9aeb770edfb7d91b5055 (diff)
downloadmc-78c19177f70b9b5c798e815c34e63aa3634214f1.tar.gz
Apply fixes thanks to tridactyla on IRC.
Diffstat (limited to 'doc')
-rw-r--r--doc/lang.txt16
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/lang.txt b/doc/lang.txt
index 543f883..7c4f5f2 100644
--- a/doc/lang.txt
+++ b/doc/lang.txt
@@ -431,7 +431,7 @@ TABLE OF CONTENTS:
Slices are similar to arrays in many contemporary languages. They are
reference types that store the length of their contents. They are
- declared by appending a '[,]' to the base type.
+ declared by appending a '[:]' to the base type.
foo# type: pointer to foo
foo[N] type: array size N of foo
@@ -458,8 +458,10 @@ TABLE OF CONTENTS:
(int, int, char) a tuple of 2 ints and a char
- struct a struct containing an int named a :
- int 'a', and a char named 'b'. b : char ;;
+ struct a struct containing an int named
+ a : int 'a', and a char named 'b'.
+ b : char
+ ;;
union a union containing one of
`Thing int int or char. The values are not
@@ -511,7 +513,7 @@ TABLE OF CONTENTS:
defined in section 4.5.
A typaram ("@ident") is a type parameter. It is introduced as either a
- parameter of a generic declaration, or as a type paramteter in a
+ parameter of a generic declaration, or as a type paramter in a
defined type. It can be constrained by any number of traits, as
described in section 4.6.
@@ -564,9 +566,9 @@ TABLE OF CONTENTS:
4.4.2. Impls:
- impldef: "impl" ident imptypes "=" implbody
- traittypes: type ["->" type ("," type)*]
- traitbody: (name [":" type] "=" expr)*
+ implstmt: "impl" ident impltypes "=" implbody
+ impltypes: type ["->" type ("," type)*]
+ implbody: (name [":" type] "=" expr)*
Impls take the interfaces provided by traits, and attach them
to types, as well as providing the concrete implementation of