You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* parse ... in variants
* initial implementation of expanding variant type spreads
* transfer attributes
* comments and clarifications
* ensure that variant spreads are compliant with the underlying variants runtime configuration, and get some basic error reporting going
* proper error reporting for non-discoverable types
* report errors on duplicate constructors in spreads
* error on type parameters in variant type spreads
* make inline records work when spreading variants
[1;31m1[0m [2m│[0m type rec a = One | Two | Three and b = Four | Five and c = | ...[1;31ma[0m | ...b
6
+
2 [2m│[0m
7
+
8
+
This type could not be found. It's only possible to spread variants that are known as the spread happens. This means for example that you can't spread variants in recursive definitions.
1 [2m│[0m @tag("kind") type a = One(int) | Two(string)
6
+
[1;31m2[0m [2m│[0m type b = | ...[1;31ma[0m | Three(bool)
7
+
3 [2m│[0m
8
+
9
+
The @tag attribute does not match for this variant and the variant where this is spread. Both variants must have the same @tag attribute configuration, or no @tag attribute at all.
1 [2m│[0m @tag("kind") type a = One(int) | Two(string)
6
+
[1;31m2[0m [2m│[0m @tag("name") type b = | ...[1;31ma[0m | Three(bool)
7
+
3 [2m│[0m
8
+
9
+
The @tag attribute does not match for this variant and the variant where this is spread. Both variants must have the same @tag attribute configuration, or no @tag attribute at all.
fprintf ppf "@[This type could not be found. It's only possible to spread variants that are known as the spread happens. This means for example that you can't spread variants in recursive definitions.@]"
fprintf ppf "@[Variant %s has a constructor named %s, but a constructor named %s already exists in the variant it's spread into.@ You cannot spread variants with overlapping constructors.@]"
0 commit comments