[mercury-users] switch detection
Michael Day
mikeday at yeslogic.com
Tue Jan 9 12:48:33 AEDT 2007
Hi Ralph,
> What's happening here is that switch detection only looks at
> unifications and not function calls, which is what field accesses are.
> The solution is to move the field access outside the switch and use
> a temporary variable, e.g.:
This is an issue that's bitten me many times, particularly when taking a
datatype that used to be public and making it abstract and replacing the
field accesses with functions. Would it be possible for the compiler to
hoist the function out of the switch and introduce a temporary variable
by itself?
Michael
--
Print XML with Prince!
http://www.princexml.com
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list