diff options
-rw-r--r-- | rebar.config | 5 | ||||
-rw-r--r-- | src/rlx_depsolver.erl | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/rebar.config b/rebar.config index cf03ea3..a250ce9 100644 --- a/rebar.config +++ b/rebar.config @@ -21,7 +21,10 @@ %% Compiler Options ============================================================ {erl_opts, - [debug_info, warnings_as_errors, inline]}. + [{platform_define, "^[0-9]+", namespaced_types}, + debug_info, + warnings_as_errors, + inline]}. %% EUnit ======================================================================= {eunit_opts, diff --git a/src/rlx_depsolver.erl b/src/rlx_depsolver.erl index 20423d0..5d78174 100644 --- a/src/rlx_depsolver.erl +++ b/src/rlx_depsolver.erl @@ -112,7 +112,11 @@ %%============================================================================ %% type %%============================================================================ +-ifdef(namespaced_types). +-type dep_graph() :: gb_tree:tree(). +-else. -type dep_graph() :: gb_tree(). +-endif. -opaque t() :: {?MODULE, dep_graph()}. -type pkg() :: {pkg_name(), vsn()}. -type pkg_name() :: binary() | atom(). |