[mercury-users] How to vary implementations of a pred declaration?
Julien Fischer
juliensf at cs.mu.OZ.AU
Thu Mar 23 09:46:30 AEDT 2006
On Wed, 22 Mar 2006 doug.auclair at logicaltypes.com wrote:
> Hi! I have a rather complicated and lengthy predicate declaration (it's
> arity 25). It is implemented by anywhere from 150 to 10000 clauses,
> depending on which one of the five different executables I'm producing.
>
> My question is as follows: is there a way to make this declaration once
> in one place and then direct the compiler to select the implementation
> file appropriate for the current task at hand?
>
> Copy-and-paste coding is tedious and error-prone (even declarative
> and pure coding), so I hope there's something like a command-line
> switch or pre-processing directive that permits selecting the
> implementation at compile time. What would that directive be?
One way would be store each implementation in a module in a different
subdirectory of the source tree and use the `--generate-source-file-mapping'
('-f') option to select between them.
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list