@Override
 public boolean endsCorrectly() {
   if (getNode().findChildByType(OCamlTokenTypes.OF_KEYWORD) != null) {
     return OCamlPsiUtil.endsCorrectlyWith(this, OCamlTypeExpression.class);
   } else if (getNode().findChildByType(OCamlTokenTypes.EQ) != null) {
     return OCamlPsiUtil.endsCorrectlyWith(this, OCamlConstructorPath.class);
   } else {
     return OCamlPsiUtil.endsCorrectlyWith(this, OCamlConstructorNameDefinition.class);
   }
 }
 @Override
 public boolean processDeclarations(@NotNull final ResolvingBuilder builder) {
   return OCamlPsiUtil.hasChildOfType(this, OCamlPattern.class)
       ? OCamlDeclarationsUtil.processDeclarationsInChildren(builder, this, OCamlPattern.class)
       : OCamlDeclarationsUtil.processDeclarationsInChildren(
           builder, this, OCamlLabelDefinition.class);
 }
 @Override
 public boolean endsCorrectly() {
   return OCamlPsiUtil.endsWith(this, OCamlTokenTypes.RPAR)
       || OCamlPsiUtil.endsCorrectlyWith(this, OCamlLabelDefinition.class)
       || OCamlPsiUtil.endsCorrectlyWith(this, OCamlPattern.class);
 }
 @Override
 public boolean endsCorrectly() {
   return OCamlPsiUtil.endsWith(this, OCamlTokenTypes.RBRACKET);
 }
 @Override
 public boolean endsCorrectly() {
   return OCamlPsiUtil.endsCorrectlyWith(this, OCamlTypeConstructorName.class);
 }
 @NotNull
 public List<OCamlStructuredElement> findActualDefinitions() {
   return OCamlResolvingUtil.collectActualDefinitionsOfStructuredElements(
       OCamlPsiUtil.getFirstChildOfType(this, OCamlModuleType.class));
 }
 @Override
 public boolean endsCorrectly() {
   return OCamlPsiUtil.endsCorrectlyWith(this, OCamlModuleType.class);
 }