@@ -645,9 +645,9 @@ message KindCheckError {
645
645
646
646
// Unbound type reference ty_ref detected in term ty_def.
647
647
message UnboundTyRefError {
648
- TyDef ty_def = 1 ;
649
- TyRef ty_ref = 2 ;
650
- ModuleName module_name = 3 ;
648
+ ModuleName module_name = 1 ;
649
+ TyDef ty_def = 2 ;
650
+ TyRef ty_ref = 3 ;
651
651
}
652
652
653
653
// In ty_def an error has occurred when trying to unify kind ty_kind_lhs
@@ -656,35 +656,34 @@ message KindCheckError {
656
656
// FIXME(cstml): Add source of constraint to the error such that user can see
657
657
// where the constraint was generated - therefore where the error precisely
658
658
// is.
659
- message ImpossibleUnificationError {
660
- TyDef ty_def = 1 ;
661
- Kind ty_kind_lhs = 2 ;
662
- Kind ty_kind_rhs = 3 ;
663
- ModuleName module_name = 4 ;
659
+ message UnificationError {
660
+ ModuleName module_name = 1 ;
661
+ TyDef ty_def = 2 ;
662
+ Kind ty_kind_lhs = 3 ;
663
+ Kind ty_kind_rhs = 4 ;
664
664
}
665
665
666
- // A cyclic term was encountered. Infinite terms like this are not acceptable,
667
- // and we do not support them. We could not construct infinite "a = ty_name a"
668
- // error.
669
- message RecursiveKindError {
666
+ // A cyclic kind was encountered. Infinite kinds like this are not acceptable,
667
+ // and we do not support them. We could not construct infinite kind in ty_def.
668
+ message CyclicKindError {
670
669
TyDef ty_def = 1 ;
671
670
ModuleName module_name = 2 ;
672
671
}
673
672
674
673
// The actual_kind differs from the expected_kind.
675
674
message InconsistentTypeError {
676
- TyDef ty_def = 1 ;
677
- Kind actual_kind = 2 ;
678
- Kind expected_kind = 3 ;
679
- ModuleName module_name = 4 ;
675
+ ModuleName module_name = 1 ;
676
+ TyDef ty_def = 2 ;
677
+ Kind actual_kind = 3 ;
678
+ Kind expected_kind = 4 ;
680
679
}
681
680
682
681
// One of the errors occurred during kind checking.
683
682
oneof kind_check_error {
684
683
UnboundTyRefError unbound_ty_ref_error = 1 ;
685
684
UnboundTyVarError unbound_ty_var_error = 2 ;
686
- ImpossibleUnificationError impossible_unification_error = 3 ;
687
- RecursiveKindError recursive_kind_error = 4 ;
685
+ UnificationError unification_error = 3 ;
686
+ CyclicKindError cyclic_kind_error = 4 ;
688
687
InconsistentTypeError inconsistent_type_error = 5 ;
689
688
}
690
689
}
0 commit comments