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% %%
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)
747745list (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 ().
773771shrink_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 ().
793791is_sublist ([], _ ) -> true ;
794792is_sublist (_ , []) -> false ;
795793is_sublist ([H |T1 ], [H |T2 ]) -> is_sublist (T1 , T2 );
0 commit comments