Skip to content

Commit ce4895d

Browse files
committed
docs: error docs
1 parent 6feb00b commit ce4895d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lambda-buffers-proto/compiler.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,17 @@ message KindCheckError {
665665

666666
// A cyclic kind was encountered. Infinite kinds like this are not acceptable,
667667
// and we do not support them. We could not construct infinite kind in ty_def.
668+
//
669+
// As the implementation currently stands such an error is (most likely) not
670+
// representable - therefore not reachable. Such an error would usually occur
671+
// for a term like: λa. a a - in which case the inference would try to unify
672+
// two kinds of the form: m and m -> n - because m appears in both terms -
673+
// the cyclic unification error would be thrown.
674+
//
675+
// In the case of LambdaBuffers - such an error is not (currently) achievable
676+
// as the kind of the variable is given by the context - (i.e. λa : m . a a,
677+
// where m is a kind) therefore the unification would fail with Unification
678+
// Error. Nevertheless - future features might require it.
668679
message CyclicKindError {
669680
TyDef ty_def = 1;
670681
ModuleName module_name = 2;

0 commit comments

Comments
 (0)