[m-users.] problem with unique modes

Matthias Güdemann matthias at guedemann.org
Tue Jun 16 04:09:32 AEST 2015


Hi,

I defined a data type which holds two state variables, like in

,----
| :- type state --->
|         state(
|            substate1 :: state1,
|            substate2 :: state2
|            ).
`----

Now I'd like to have predicates that advance a 'state' by advancing the
substates, i.e. a predicate has 'state::di' and 'state::uo' arguments
and calls others with analogous arguments for substate1 and substate2.

The problem is that I get lots of unique mode errors. Is this because I
am doing it wrong? Or is it because of the limits described in the
documentation[1]?

My principal goal is to have a list of states that are advanced
iteratively by a predicate that takes a list of 'di' inputs and creates
a list of 'uo' moded outputs. How is this handled in general?

Best regards,
Matthias

Footnotes: 
[1]  http://mercurylang.org/information/doc-release/mercury_ref/Limitations-of-the-current-implementation.html#Limitations-of-the-current-implementation




More information about the users mailing list