[mercury-users] Tip for the day...

Warwick Harvey wharvey at cs.monash.edu.au
Mon Feb 21 15:22:51 AEDT 2000


Tip for the day:

Don't use any predicate names in Mercury containing the substring `*/'.  :-)

For those who don't know, the HAL compiler generates some seriously mangled 
Mercury code.  Just now I've been trying to get some code using HAL's delay 
mechanism compiled all the way through to an executable.  After fixing a few 
bugs and hacking my way around others, I finally got the Mercury compiler to 
accept the code I was giving it.  Only to have it rejected by the C 
compiler.  With the rather unexpected error `unterminated character 
constant'.  Even more unexpected was the fact that the line in question 
contained just a comment.  Then I had a closer look at the comment:

/* code for predicate 'myfd:*/3/1/11_mode_proc_1'/4 in mode 0 */

... and cracked up laughing.

Warwick

--------------------------------------------------------------------------
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