diff options
author | Florian Angeletti <florian.angeletti@inria.fr> | 2019-07-12 17:47:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-12 17:47:25 +0200 |
commit | 658233568930c9b1c291f78d8ac2177e67aa9981 (patch) | |
tree | b7c298e982ef5d79cc42284c7580592f4a9efad0 /typing/types.ml | |
parent | e57912913311342d957583b78c82821671210770 (diff) | |
download | ocaml-658233568930c9b1c291f78d8ac2177e67aa9981.tar.gz |
#8702: fix some polymorphic variant error messages (#8777)
improved error messages for fixed row polymorphic variants: keep track of the motivation behind a fixed row (e.g it was bound to an universal or existential type variable, or private) in the types themselves and use this explanation in error messages.
Diffstat (limited to 'typing/types.ml')
-rw-r--r-- | typing/types.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/typing/types.ml b/typing/types.ml index 8bda6b6c7f..aa49e2e957 100644 --- a/typing/types.ml +++ b/typing/types.ml @@ -45,9 +45,10 @@ and row_desc = row_more: type_expr; row_bound: unit; row_closed: bool; - row_fixed: bool; + row_fixed: fixed_explanation option; row_name: (Path.t * type_expr list) option } - +and fixed_explanation = + | Univar of type_expr | Fixed_private | Reified of Path.t | Rigid and row_field = Rpresent of type_expr option | Reither of bool * type_expr list * bool * row_field option ref |