Skip to content

Commit 137c50b

Browse files
authored
Update misc_docs/syntax/language_polyvar.mdx
1 parent 685427a commit 137c50b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc_docs/syntax/language_polyvar.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ category: "languageconstructs"
1010

1111
In comparison to nominally typed variants, their values don't require any explicit type definition, and are not coupled to any specific module. The compiler will infer the type on demand, and compare poly variants by their value, instead of their type name.
1212

13-
However, using the `[ #value ]` syntax you can to define a _closed poly variant type_ with an exact set of values, known as constructors.
13+
However, you can also describe a set of polymorphic variants with a type declaration, which can be useful to explicitly annotate function parameters and values. The most common format is the _closed poly variant_ type definition that looks like this: `type x = [ #value ]` (Note the extra `[]` around the poly variant constructors!).
1414

1515
### Example
1616

0 commit comments

Comments
 (0)