[m-users.] Mode and inst confusion in ODBC library

Volker Wysk <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
Hi

In the ODBC extra library, there's this:

-----snip-----
:- type odbc.transaction(T) ==  pred(T, odbc.state, odbc.state).
:- mode odbc.transaction ==  (pred(out, di, uo) is det).

% ...

:- pred odbc.transaction(data_source::in, user_name::in, password::in,
    transaction(T)::transaction, 
    odbc.result(T)::out, io::di, io::uo) is det.
-----snip-----

The mode of the fourth argument of the predicate is a (higher order) inst,
not a mode - ?? According to Ralph Becket's Mercury tutorial, the mode of an
argument is a mapping from the instantiation before the call to after the
call of the predicate. And it's written "Before >> After" (or defined this
way).

Cheers,
Volker

_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmTShjwACgkQ+K4ydFOs
HoUfQBAAweKXT5eNJpUjNxpyTFn/m022MO08DwkU1vhvX72nnVbxbbauu49MU81/
ztlp198xbDd7IA5wEWE6n1hHcCWVgU0SwIHFh2I3GLEYUacpgS2BbzdRDEssLqeZ
F1hRAWiM8s0f9YoTktWIICtBz/admaS3w7Y39teknUwB66jyV+C7gNr6UHpPKMxS
2VvLzDyE6/PJooeqeSM/00ltCd/dIRkBqI204mcIoVwO7QpCyaSkgwHuBfXAzMp8
4Z02uKX9DnWrtFJ1LpIIZq6pey+lNt2dAAbx5vphGa8Sn2RWqYitbbQmn7uGcz1+
ZLbGXQ2jlWkc8xKVOpasqRZay8fBI6eYUEX9aFte3gQIdHmUgRn8hsU3CNkqzIvO
6uibrzFEbSA+yT6MbaBdCSahhTx0XdJaTBFU2GtNjv+1jzfGF42tt2VUdaAsOdTl
kKlXO/Lg6JFg4kvhOpnURZ+r+IEJQwsi/Hf7DmcB8/QN+Q3AEjPdryiZ5TOVYleL
H2rQzPSL8XWkOGMZBs5AgG5bm+7+puwxwtCzsQBtOMVvhng+EIXxsq79z7MjUIFT
X9MuAVn5CA/TM2Gx9ct8eNlYI9L05DebCChPKaw7Y7QTI4kvfJIJVLIL5KZsyhHt
MyUh1s+hrd7Z4XOq7XxVworAIBOdmmhDpp7Bs7ZvLjDu5Fy2nxA=
=5yRB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.