Proper checking of types

This commit is contained in:
Ulf Norell
2019-02-04 18:01:47 +01:00
parent dfa286d43c
commit d9188d58a7
6 changed files with 187 additions and 54 deletions
+4 -2
View File
@@ -236,8 +236,10 @@ type({app_t, _, Type, Args}) ->
beside(type(Type), tuple_type(Args));
type({tuple_t, _, Args}) ->
tuple_type(Args);
type({named_arg_t, _, Name, Type, Default}) ->
follow(hsep(typed(name(Name), Type), text("=")), expr(Default));
type({named_arg_t, _, Name, Type, _Default}) ->
%% Drop the default value
%% follow(hsep(typed(name(Name), Type), text("=")), expr(Default));
typed(name(Name), Type);
type(R = {record_t, _}) -> typedef(R);
type(T = {id, _, _}) -> name(T);