[m-rev.] trivial diff: fix promise_semipure
David Jeffery
dgj at missioncriticalit.com
Tue May 7 21:16:36 AEST 2002
I'll commit this soon if there are no objections...
dgj
----- Original Message -----
From: "David Jeffery" <dgj at missioncriticalit.com>
To: <mercury-reviews at cs.mu.OZ.AU>
Sent: Friday, May 03, 2002 6:36 PM
Subject: Re: [m-rev.] trivial diff: fix promise_semipure
> > > I now argue we should change our coding standards to make this the
> > > standard syntax we use in the compiler in new code and significant
> > > updates to the existing code (that is, that reviewers should point out
> > > opportunities to use this feature).
> >
> > Sounds like a good idea to me.
>
> Such a good idea that here's a present for Tyson. ;-)
>
> -------------------------------------------------------------------
>
> Estimated hours taken: 0.5
>
> compiler/module_qual.m:
> Use unification expressions in all the appropriate arms of a large
> switch.
>
> -------------------------------------------------------------------
> cvs server: Diffing .
> Index: module_qual.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/module_qual.m,v
> retrieving revision 1.78
> diff -u -t -r1.78 module_qual.m
> --- module_qual.m 2 May 2002 16:24:01 -0000 1.78
> +++ module_qual.m 3 May 2002 17:29:45 -0000
> @@ -893,14 +893,13 @@
> :- pred qualify_pragma((pragma_type)::in, (pragma_type)::out,
> mq_info::in, mq_info::out, io__state::di, io__state::uo)
is
> det.
>
> -qualify_pragma(source_file(File), source_file(File), Info, Info) --> [].
> -qualify_pragma(foreign_decl(L, Code), foreign_decl(L, Code), Info,
> Info) --> [].
> -qualify_pragma(foreign_code(L, C), foreign_code(L, C), Info, Info) -->
[].
> -qualify_pragma(foreign_type(ForeignType, Type0, SymName),
> +qualify_pragma(X at source_file(_), X, Info, Info) --> [].
> +qualify_pragma(X at foreign_decl(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at foreign_code(_, _), X, Info, Info) --> [].
> +qualify_pragma(foreign_type(ForeignType, Type0, SymName),
> foreign_type(ForeignType, Type, SymName), Info0,
Info) -->
> qualify_type(Type0, Type, Info0, Info).
> -qualify_pragma(foreign_import_module(L, M), foreign_import_module(L, M),
> - Info, Info) --> [].
> +qualify_pragma(X at foreign_import_module(_, _), X, Info, Info) --> [].
> qualify_pragma(
> foreign_proc(Rec, SymName, PredOrFunc, PragmaVars0, Varset,
> Code),
> foreign_proc(Rec, SymName, PredOrFunc, PragmaVars, Varset,
> Code),
> @@ -917,9 +916,9 @@
> { Info = Info0 },
> { MModes = no }
> ).
> -qualify_pragma(inline(A, B), inline(A, B), Info, Info) --> [].
> -qualify_pragma(no_inline(A, B), no_inline(A, B), Info, Info) --> [].
> -qualify_pragma(obsolete(A, B), obsolete(A, B), Info, Info) --> [].
> +qualify_pragma(X at inline(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at no_inline(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at obsolete(_, _), X, Info, Info) --> [].
> qualify_pragma(import(Name, PredOrFunc, Modes0, Attributes, CFunc),
> import(Name, PredOrFunc, Modes, Attributes, CFunc),
> Info0, Info) -->
> @@ -927,8 +926,7 @@
> qualify_pragma(export(Name, PredOrFunc, Modes0, CFunc),
> export(Name, PredOrFunc, Modes, CFunc), Info0, Info) -->
> qualify_mode_list(Modes0, Modes, Info0, Info).
> -qualify_pragma(unused_args(A, B, C, D, E), unused_args(A, B, C, D, E),
> - Info, Info) --> [].
> +qualify_pragma(X at unused_args(_, _, _, _, _), X, Info, Info) --> [].
> qualify_pragma(type_spec(A, B, C, D, MaybeModes0, Subst0, G, H),
> type_spec(A, B, C, D, MaybeModes, Subst, G, H),
> Info0, Info) -->
> @@ -942,40 +940,26 @@
> { MaybeModes = no }
> ),
> qualify_type_spec_subst(Subst0, Subst, Info1, Info).
> -qualify_pragma(fact_table(SymName, Arity, FileName),
> - fact_table(SymName, Arity, FileName), Info, Info) --> [].
> -qualify_pragma(aditi(SymName, Arity), aditi(SymName, Arity),
> - Info, Info) --> [].
> -qualify_pragma(base_relation(SymName, Arity), base_relation(SymName,
> Arity),
> - Info, Info) --> [].
> -qualify_pragma(aditi_index(SymName, Arity, Index),
> - aditi_index(SymName, Arity, Index), Info, Info) --> [].
> -qualify_pragma(supp_magic(SymName, Arity), supp_magic(SymName, Arity),
> - Info, Info) --> [].
> -qualify_pragma(context(SymName, Arity), context(SymName, Arity),
> - Info, Info) --> [].
> -qualify_pragma(aditi_memo(A, B), aditi_memo(A, B), Info, Info) --> [].
> -qualify_pragma(aditi_no_memo(SymName, Arity), aditi_no_memo(SymName,
> Arity),
> - Info, Info) --> [].
> -qualify_pragma(naive(SymName, Arity), naive(SymName, Arity),
> - Info, Info) --> [].
> -qualify_pragma(psn(SymName, Arity), psn(SymName, Arity),
> - Info, Info) --> [].
> -qualify_pragma(owner(SymName, Arity, Owner), owner(SymName, Arity,
Owner),
> - Info, Info) --> [].
> -qualify_pragma(promise_pure(SymName, Arity), promise_pure(SymName,
Arity),
> - Info, Info) --> [].
> -qualify_pragma(promise_semipure(SymName, Arity),
> - promise_semipure(SymName, Arity), Info, Info) --> [].
> +qualify_pragma(X at fact_table(_, _, _), X, Info, Info) --> [].
> +qualify_pragma(X at aditi(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at base_relation(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at aditi_index(_, _, _), X, Info, Info) --> [].
> +qualify_pragma(X at supp_magic(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at context(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at aditi_memo(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at aditi_no_memo(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at naive(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at psn(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at owner(_, _, _), X, Info, Info) --> [].
> +qualify_pragma(X at promise_pure(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at promise_semipure(_, _), X, Info, Info) --> [].
> qualify_pragma(termination_info(PredOrFunc, SymName, ModeList0, Args,
> Term),
> termination_info(PredOrFunc, SymName, ModeList, Args,
> Term),
> Info0, Info) -->
> qualify_mode_list(ModeList0, ModeList, Info0, Info).
> -qualify_pragma(terminates(A, B), terminates(A, B), Info, Info) --> [].
> -qualify_pragma(does_not_terminate(A, B), does_not_terminate(A, B),
> - Info, Info) --> [].
> -qualify_pragma(check_termination(A, B), check_termination(A, B), Info,
> - Info) --> [].
> +qualify_pragma(X at terminates(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at does_not_terminate(_, _), X, Info, Info) --> [].
> +qualify_pragma(X at check_termination(_, _), X, Info, Info) --> [].
>
> :- pred qualify_pragma_vars(list(pragma_var)::in, list(pragma_var)::out,
> mq_info::in, mq_info::out, io__state::di, io__state::uo)
is
> det.
> cvs server: Diffing notes
>
>
>
> --------------------------------------------------------------------------
> mercury-reviews mailing list
> post: mercury-reviews at cs.mu.oz.au
> administrative address: owner-mercury-reviews at cs.mu.oz.au
> unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message:
unsubscribe
> subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message:
subscribe
> --------------------------------------------------------------------------
>
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list