Conversation

Are modes restrictive or merely descriptive? Like, if you try to use `check` to synthesize a type, will it (a) fail with some bad error message, where an explicit mode would've resulted in a better one, or (b) succeed, but you'd've preferred it didn't by specifying the mode?
1
Makam does not have modes - this was invented syntax, hehe. In the case of Mecury it uses them to generate different implementations of the same predicate. You can have multiple mode decls for the same predicate. If you try to use a mode that is not in that list it's an error.
2
1
This is in contrast to Makam and Prolog where the information seems to flow (?) dynamically. This is more expressive than Mercury, but harder to make run fast, from speaking to Mercury folks at work.
1
1
Like, maybe it would be better to say: check : in -> in -> in -> semidet. synth : in -> in -> out -> semidet. To say that both of those might fail, but are otherwise deterministic. Check with an output mode for the type would be: check : in -> in -> out -> nondet.
1
1
Show replies