Skip to content

Commit

Permalink
Erlang/OTP 27 finally exports re:mp/0 and re:compile_options/0 types
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Nov 29, 2024
1 parent 44a2869 commit 0e8eb5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- run: rebar3 compile
- run: rebar3 xref
- run: rebar3 dialyzer
if: matrix.otp != 26 # Some re types are not exported in OTP 26
- run: rebar3 eunit -v
- name: Send to Coveralls
if: matrix.otp == 26
Expand Down
8 changes: 4 additions & 4 deletions src/yconf.erl
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ binary() ->
binary(Regexp) ->
binary(Regexp, []).

-spec binary(iodata(), [re:compile_option()]) -> validator(binary()).
-spec binary(iodata(), re:compile_options()) -> validator(binary()).
binary(Regexp, Opts) when is_list(Regexp) orelse is_binary(Regexp) ->
fun(Val) ->
Bin = to_binary(Val),
Expand All @@ -265,7 +265,7 @@ string() ->
string(Regexp) ->
string(Regexp, []).

-spec string(iodata(), [re:compile_option()]) -> validator(string()).
-spec string(iodata(), re:compile_options()) -> validator(string()).
string(Regexp, Opts) when is_list(Regexp) orelse is_binary(Regexp) ->
fun(Val) ->
Str = to_string(Val),
Expand Down Expand Up @@ -451,7 +451,7 @@ timeout(Unit, Inf) ->
re() ->
re([]).

-spec re([re:compile_option()]) -> validator(re:mp()).
-spec re(re:compile_options()) -> validator(re:mp()).
re(Opts) ->
fun(Val) ->
Bin = to_binary(Val),
Expand All @@ -465,7 +465,7 @@ re(Opts) ->
glob() ->
glob([]).

-spec glob([re:compile_option()]) -> validator(re:mp()).
-spec glob(re:compile_options()) -> validator(re:mp()).
glob(Opts) ->
fun(Val) ->
S = to_string(Val),
Expand Down

0 comments on commit 0e8eb5c

Please sign in to comment.