Skip to content

Commit 9679708

Browse files
committed
Fix typos
1 parent 8875300 commit 9679708

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pages/docs/manual/latest/polymorphic-variant.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ let other = [#GreeN]
133133
let all = Belt.Array.concat(colors, other)
134134
```
135135

136-
I'd get an error on the `concat` call, even thought he error actually stems from my typo in my `other` definition.
136+
I'd get an error on the `concat` call, even thought the error was actually caused by the typo in the value assignment of `other`.
137137

138138
## JavaScript Output
139139

@@ -215,7 +215,7 @@ Since we were using poly variants, the JS Output is practically zero-cost and do
215215

216216
## Lower / Upper Bound Constraints
217217

218-
There are a few different ways to define constraints on a poly variant type, such as `[>`, `[<` and `[]`. Some of them were briefly mentioned before, so in this section we will quickly explain what this syntax is about.
218+
There are a few different ways to define constraints on a poly variant type, such as `[>`, `[<` and `[`. Some of them were briefly mentioned before, so in this section we will quickly explain what this syntax is about.
219219

220220
**Note:** We added this info for educational purposes. In most cases you will not want to use any of this stuff, since it makes your APIs pretty unreadable / hard to use.
221221

@@ -237,7 +237,7 @@ In case you want to define a type that is extensible in polymorphic ways (or in
237237

238238
A lower bound defines the minimum set of constructors a poly variant type is aware of. It is also considered an "open poly variant type", because it doesn't restrict any additional values.
239239

240-
Here is an example on how to make a minimum set of `basicBlueTones` extensible in a new `colors` type:
240+
Here is an example on how to make a minimum set of `basicBlueTones` extensible for a new `colors` type:
241241

242242
```res
243243
type basicBlueTone<'a> = [> #Blue | #DeepBlue | #Azuro ] as 'a
@@ -254,9 +254,9 @@ Here, the compiler will enforce the user to define `#Blue | #DeepBlue | #Azuro`
254254

255255
### Upper Bound (`[<`)
256256

257-
The upper bound works in the exact opposite way: The extending type may only use constructors that are stated in the lower bound constraing.
257+
The upper bound works in the exact opposite way: The extending type may only use constructors that are stated in the lower bound constraint.
258258

259-
Same example:
259+
Here another example, but with red colors:
260260

261261
```res
262262
type validRed<'a> = [< #Fire | #Crimson | #Ash] as 'a

0 commit comments

Comments
 (0)