[m-dev.] deconstructing store

Peter Wang novalazy at gmail.com
Fri Aug 13 14:55:11 AEST 2010

A program may crash if you try to print out a `store' value.  This is
an unusual thing to do, but ssdebug will do it if you try to print out
the arguments of a call.

store(S) is defined as a du type in the library (single argument
constructor) but the compiler treats it specially as a dummy type.
If you try to deconstruct the value, you end up dereferencing a random

store(S) isn't defined as a dummy type, probably because then it can't
have user-defined equality.  I could try to make ssdebug ignore store
arguments so they won't be printed, but it won't solve the problem
for polymorphic arguments.

Is there any good reason to treat the store type specially?
Does the optimisation make any difference in practice?

mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au

More information about the developers mailing list