From 5a66cd64bc814b66c88b79a044f1f1512b21df6d Mon Sep 17 00:00:00 2001
From: Hans Bolinder
Date: Wed, 9 Dec 2015 15:19:05 +0100
Subject: doc: Remove 'is_subtype' from Types and Function Specifications
It is harder to remove is_subtype from the parser since the abstract
format does not separate is_subtype from the '::' syntax.
---
system/doc/reference_manual/typespec.xml | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
(limited to 'system/doc/reference_manual/typespec.xml')
diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index 22627058c1..a238e3135a 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -495,7 +495,8 @@
-spec id(X) -> X when X :: tuple().
- Currently, the :: constraint (read as is_subtype) is
+ Currently, the :: constraint
+ (read as «is a subtype of») is
the only guard constraint that can be used in the 'when'
part of a '-spec' attribute.
@@ -529,16 +530,6 @@
-spec foo({X, integer()}) -> X when X :: atom()
; ([Y]) -> Y when Y :: number().
-
-
- For backwards compatibility the following form is also allowed:
-
- -spec id(X) -> X when is_subtype(X, tuple()).
-
- but its use is discouraged. It will be removed in a future
- Erlang/OTP release.
-
-
Some functions in Erlang are not meant to return;
either because they define servers or because they are used to
--
cgit v1.2.3