dialyzer_contracts

Types


contr_constr() =
            {subtype, erl_types:erl_type(), erl_types:erl_type()}

contract_pair() = {erl_types:erl_type(), [contr_constr()]}

contracts() =
            dict:dict(mfa(), dialyzer_contracts:file_contract())

dial_warn_tag() = warn_return_no_exit
                        | warn_return_only_exit
                        | warn_not_called
                        | warn_non_proper_list
                        | warn_matching
                        | warn_opaque
                        | warn_fun_app
                        | warn_failing_call
                        | warn_bin_construction
                        | warn_contract_types
                        | warn_contract_syntax
                        | warn_contract_not_equal
                        | warn_contract_subtype
                        | warn_contract_supertype
                        | warn_callgraph
                        | warn_umatched_return
                        | warn_race_condition
                        | warn_behaviour
                        | warn_contract_range
                        | warn_undefined_callbacks
                        | warn_unknown

file_contract() =
            {file_line(),
             #contract{contracts = [contract_pair()],
                       args = [erl_types:erl_type()],
                       forms = [{term(), term()}]},
             Extra :: [term()]}

file_line() = {file:filename(), integer() >= 0}

label() = integer() >= 0

m_or_mfa() = module() | mfa()

opaques() = [erl_types:erl_type()] | universe

opaques_fun() = fun((module()) -> opaques())

plt_contracts() =
            orddict:orddict(mfa(),
                            #contract{contracts = [contract_pair()],
                                      args = [erl_types:erl_type()],
                                      forms = [{term(), term()}]})

raw_warning() =
            {dial_warn_tag(), warning_info(), {atom(), [term()]}}

spec_data() = {TypeSpec :: [term()], Xtra :: [term()]}

warning_info() =
            {file:filename(), integer() >= 0, m_or_mfa()}

Functions


get_contract_return(Contract::#contract{contracts=[contract_pair()], args=[erl_type() (see module erl_types)], forms=[{term(), term()}]}) -> erl_type() (see module erl_types)

get_contract_return(Contract::#contract{contracts=[contract_pair()], args=[erl_type() (see module erl_types)], forms=[{term(), term()}]}, Args::[erl_type() (see module erl_types)]) -> erl_type() (see module erl_types)

get_contract_args(Contract::#contract{contracts=[contract_pair()], args=[erl_type() (see module erl_types)], forms=[{term(), term()}]}) -> [erl_type() (see module erl_types)]

is_overloaded(Contract::#contract{contracts=[contract_pair()], args=[erl_type() (see module erl_types)], forms=[{term(), term()}]}) -> boolean()

contract_to_string(Contract::#contract{contracts=[contract_pair()], args=[erl_type() (see module erl_types)], forms=[{term(), term()}]}) -> string()

process_contract_remote_types(CodeServer::codeserver() (see module dialyzer_codeserver)) -> codeserver() (see module dialyzer_codeserver)

check_contracts(Contracts::[{mfa(), file_contract()}], Callgraph::callgraph() (see module dialyzer_callgraph), FunTypes::fun_types(), FindOpaques::opaques_fun()) -> plt_contracts()

check_contract(Contract::#contract{contracts=[contract_pair()], args=[erl_type() (see module erl_types)], forms=[{term(), term()}]}, SuccType::erl_type() (see module erl_types)) -> ok | {error, term()}

contracts_without_fun(Contracts::contracts(), AllFuns0::[term()], Callgraph::callgraph() (see module dialyzer_callgraph)) -> [raw_warning()]

store_tmp_contract(MFA::mfa(), FileLine::file_line(), X3::spec_data(), SpecDict::contracts(), RecordsDict::types()) -> contracts()

get_invalid_contract_warnings(Modules::[module()], CodeServer::codeserver() (see module dialyzer_codeserver), Plt::plt() (see module dialyzer_plt), FindOpaques::opaques_fun()) -> [raw_warning()]