[m-rev.] for review: fix mantis bug #82

Zoltan Somogyi zs at csse.unimelb.edu.au
Wed Aug 27 13:09:15 AEST 2008


On 27-Aug-2008, Peter Wang <novalazy at gmail.com> wrote:
> +constructor_list_represents_dummy_argument_type_2(TypeDefnMap, [Ctor], no,
> +        CoveredTypes) :-
> +    Ctor = ctor(ExistQTVars, Constraints, _Name, Args, _Context),
> +    ExistQTVars = [],
> +    Constraints = [],
> +    (
> +        % A single zero-arity constructor.
> +        Args = []
> +    ;
> +        % A constructor with a single argument.
> +        Args = [ctor_arg(_, ArgType, _)],
> +        ctor_arg_is_dummy_type(TypeDefnMap, ArgType, CoveredTypes) = yes
> +    ).

The comment should be

	A constructor with a single DUMMY argument.

> --- a/compiler/type_util.m
> +++ b/compiler/type_util.m
> @@ -139,6 +139,9 @@
>      % A type cannot be a dummy type if it is the subject of a foreign_enum
>      % pragma, or if it has a reserved tag or user defined equality.
>      %
> +    % NOTE: changes here may require changes to
> +    % `modules.constructor_list_represents_dummy_argument_type'.
> +    %
>  :- func check_dummy_type(module_info, mer_type) = is_dummy_type.

I am not yet done with the restructure of modules.m, so the module name
"modules" may quickly become out of date; better delete it.

Otherwise, the diff looks fine.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list