[mercury-users] Lies, Damn lies, and Purity Declarations

Michael Day mikeday at bigpond.net.au
Mon Apr 15 15:25:59 AEST 2002


:- func very_unsafe_make_io = io.

:- pragma foreign_proc("C", very_unsafe_make_io = (IO::out), [promise_pure],
	"IO = NULL;").

This function returns the same value every time it is called. The value it
returns does not depend on external state. I promise to the compiler that
it's pure. Am I lying?

Michael

PS. Don't take this very seriously, thank you.

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