Skip to content

Commit 0b13e53

Browse files
committed
Minor code cleanups
1 parent 9d442ea commit 0b13e53

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/proper_types.erl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%%% -*- coding: utf-8; erlang-indent-level: 2 -*-
22
%%% -------------------------------------------------------------------
3-
%%% Copyright 2010-2021 Manolis Papadakis <manopapad@gmail.com>,
3+
%%% Copyright 2010-2022 Manolis Papadakis <manopapad@gmail.com>,
44
%%% Eirini Arvaniti <eirinibob@gmail.com>,
55
%%% and Kostis Sagonas <kostis@cs.ntua.gr>
66
%%%
@@ -19,7 +19,7 @@
1919
%%% You should have received a copy of the GNU General Public License
2020
%%% along with PropEr. If not, see <http://www.gnu.org/licenses/>.
2121

22-
%%% @copyright 2010-2021 Manolis Papadakis, Eirini Arvaniti, and Kostis Sagonas
22+
%%% @copyright 2010-2022 Manolis Papadakis, Eirini Arvaniti, and Kostis Sagonas
2323
%%% @version {@version}
2424
%%% @author Manolis Papadakis
2525

@@ -324,10 +324,8 @@ is_type(_) ->
324324

325325
%% @private
326326
-spec equal_types(proper_types:type(), proper_types:type()) -> boolean().
327-
equal_types(SameType, SameType) ->
328-
true;
329-
equal_types(_, _) ->
330-
false.
327+
equal_types(Type1, Type2) ->
328+
Type1 =:= Type2.
331329

332330
-compile({inline, [is_raw_type/1]}).
333331
%% @private
@@ -743,7 +741,7 @@ bitstring_len_is_instance(Type, X) ->
743741
%% @doc All lists containing elements of type `ElemType'.
744742
%% Instances shrink towards the empty list, `[]'.
745743
-spec list(ElemType::raw_type()) -> proper_types:type().
746-
% TODO: subtyping would be useful here (list, vector, fixed_list)
744+
%% TODO: subtyping would be useful here (list, vector, fixed_list)
747745
list(RawElemType) ->
748746
ElemType = cook_outer(RawElemType),
749747
?CONTAINER([
@@ -769,7 +767,7 @@ list_is_instance(Type, X) ->
769767

770768
%% @doc A type that generates exactly the list `List'. Instances shrink towards
771769
%% shorter sublists of the original list.
772-
-spec shrink_list([term()]) -> proper_types:type().
770+
-spec shrink_list(list()) -> proper_types:type().
773771
shrink_list(List) ->
774772
?CONTAINER([
775773
{env, List},
@@ -789,7 +787,7 @@ shrink_list_is_instance(Type, X) ->
789787
List = get_prop(env, Type),
790788
is_sublist(X, List).
791789

792-
-spec is_sublist([term()], [term()]) -> boolean().
790+
-spec is_sublist(list(), list()) -> boolean().
793791
is_sublist([], _) -> true;
794792
is_sublist(_, []) -> false;
795793
is_sublist([H|T1], [H|T2]) -> is_sublist(T1, T2);

0 commit comments

Comments
 (0)