diff options
author | Hans Bolinder <[email protected]> | 2011-08-24 12:35:49 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2011-08-31 08:57:38 +0200 |
commit | ca7d2d43a839ab284104edea4663ada52d2c3e23 (patch) | |
tree | e748d3f36173e1054222c1bc3af249a69d13787d /lib/stdlib/src/dets.erl | |
parent | 45942fb2f521ae7e043987eedc0d6197ba7b55b0 (diff) | |
download | otp-ca7d2d43a839ab284104edea4663ada52d2c3e23.tar.gz otp-ca7d2d43a839ab284104edea4663ada52d2c3e23.tar.bz2 otp-ca7d2d43a839ab284104edea4663ada52d2c3e23.zip |
Improve and correct types and specifications in Kernel and STDLIB
Running Dialyzer on the test suites revealed a few type errors.
Diffstat (limited to 'lib/stdlib/src/dets.erl')
-rw-r--r-- | lib/stdlib/src/dets.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl index 671b5a9dd4..fa0641ffd9 100644 --- a/lib/stdlib/src/dets.erl +++ b/lib/stdlib/src/dets.erl @@ -411,7 +411,8 @@ init_table(Tab, InitFun) -> InitFun :: fun((Arg) -> Res), Arg :: read | close, Res :: end_of_input | {[object()], InitFun} | {Data, InitFun} | term(), - Options :: [{min_no_slots,no_slots()} | {format,term | bchunk}], + Options :: Option | [Option], + Option :: {min_no_slots,no_slots()} | {format,term | bchunk}, Reason :: term(), Data :: binary() | tuple(). @@ -871,11 +872,15 @@ to_ets(DTab, ETab) -> -spec traverse(Name, Fun) -> Return | {'error', Reason} when Name :: tab_name(), Fun :: fun((Object) -> FunReturn), - FunReturn :: 'continue' | {'continue', Val} | {'done', Value}, + Object :: object(), + FunReturn :: 'continue' + | {'continue', Val} + | {'done', Value} + | OtherValue, + Return :: [term()] | OtherValue, Val :: term(), Value :: term(), - Object :: object(), - Return :: [term()], + OtherValue :: term(), Reason :: term(). traverse(Tab, Fun) -> |