aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2012-09-27 09:31:06 +0200
committerHans Bolinder <[email protected]>2012-09-27 09:43:11 +0200
commit6674cff5db0c281d309723f25106dd84c33246b1 (patch)
treeb5bda11f090e7ed5de59a96888fe648c42dbbb69 /lib/stdlib
parent2660d9b52c668e85d987208f8118b415a19c4ea5 (diff)
downloadotp-6674cff5db0c281d309723f25106dd84c33246b1.tar.gz
otp-6674cff5db0c281d309723f25106dd84c33246b1.tar.bz2
otp-6674cff5db0c281d309723f25106dd84c33246b1.zip
Refine a few opaque types
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/doc/src/ets.xml8
-rw-r--r--lib/stdlib/src/binary.erl2
-rw-r--r--lib/stdlib/src/ets.erl4
-rw-r--r--lib/stdlib/src/io_lib.erl7
4 files changed, 12 insertions, 9 deletions
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index 7880bf8fbb..abaf64fb91 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -146,6 +146,10 @@
<desc><p>A match specification, see above.</p></desc>
</datatype>
<datatype>
+ <name name="comp_match_spec"/>
+ <desc><p>A compiled match specification.</p></desc>
+ </datatype>
+ <datatype>
<name name="match_pattern"/>
</datatype>
<datatype>
@@ -766,8 +770,6 @@ ets:is_compiled_ms(Broken).</code>
</func>
<func>
<name name="match_spec_compile" arity="1"/>
- <type name="comp_match_spec"/>
- <type_desc name="comp_match_spec">A compiled match specification.</type_desc>
<fsummary>Compiles a match specification into its internal representation</fsummary>
<desc>
<p>This function transforms a
@@ -791,8 +793,6 @@ ets:is_compiled_ms(Broken).</code>
</func>
<func>
<name name="match_spec_run" arity="2"/>
- <type name="comp_match_spec"/>
- <type_desc name="comp_match_spec">A compiled match specification.</type_desc>
<fsummary>Performs matching, using a compiled match_spec, on a list of tuples</fsummary>
<desc>
<p>This function executes the matching specified in a
diff --git a/lib/stdlib/src/binary.erl b/lib/stdlib/src/binary.erl
index 0e95372a76..1ed3422bc5 100644
--- a/lib/stdlib/src/binary.erl
+++ b/lib/stdlib/src/binary.erl
@@ -21,7 +21,7 @@
%% Implemented in this module:
-export([split/2,split/3,replace/3,replace/4]).
--opaque cp() :: tuple().
+-opaque cp() :: {'am' | 'bm', binary()}.
-type part() :: {Start :: non_neg_integer(), Length :: integer()}.
%%% BIFs.
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl
index 817b397cc4..ee6cff1b75 100644
--- a/lib/stdlib/src/ets.erl
+++ b/lib/stdlib/src/ets.erl
@@ -42,7 +42,7 @@
-export([i/0, i/1, i/2, i/3]).
--export_type([tab/0, tid/0, match_spec/0]).
+-export_type([tab/0, tid/0, match_spec/0, comp_match_spec/0]).
%%-----------------------------------------------------------------------------
@@ -445,7 +445,7 @@ update_element(_, _, _) ->
%%% End of BIFs
--opaque comp_match_spec() :: any(). %% this one is REALLY opaque
+-opaque comp_match_spec() :: binary(). %% this one is REALLY opaque
-spec match_spec_run(List, CompiledMatchSpec) -> list() when
List :: [tuple()],
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
index 0252cdf742..ab62b72519 100644
--- a/lib/stdlib/src/io_lib.erl
+++ b/lib/stdlib/src/io_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -82,7 +82,10 @@
-type chars() :: [char() | chars()].
-type depth() :: -1 | non_neg_integer().
--opaque continuation() :: {_, _, _, _}. % XXX: refine
+-opaque continuation() :: {Format :: string(),
+ Stack :: chars(),
+ Nchars :: non_neg_integer(),
+ Results :: [term()]}.
%%----------------------------------------------------------------------