[m-users.] Problems with store and mostly unique/unique predicates.
bartosz.witkowski at like-a-boss.net
Fri Feb 7 10:41:40 AEDT 2014
I'm having a bit of a problem with mostly-unique/unique modes and I'm
wondering if you could help me.
Is code similar to https://gist.github.com/bartosz-witkowski/8854480
possible in mercury?
My use case is a little more complicated but in the end I want to use
`store' from the stdlib - it seems that predicates that work on store
are only defined with unique insts (and not mostly-unique insts).
I tried to find ways to convert a `mdi` argument to `uo` one but there
doesn't seem to be an easy way (`unsafe_promise_unique` only works on
`in` inst arguments, and is to my understanding *unsafe* anyways).
In the end I'm wondering/searching for:
1. Should the stdlib store have predicates that work on mdi insts?
2. Is it possible to mix mostly-unique code with unique code (or does
mostly-unique code "infect" everything it touches)?
3. Ways to solve my problem ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users