Re: [m-users.] Impurity needed?

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

The type of the odbc.transaction predicate is:

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


Would it be possible to just change the transaction type from this:

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


To this:


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


So the transaction predicate can do IO, when called. This looks rather easy,
but I'm not sure I've understood correctly.

Volker

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

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmPqOiQACgkQ+K4ydFOs
HoVApA/+JP80XXIE1Ro0ifmnsbsB/UgGeLpcZi+WurXPhtGDszltUUs/Bo9fsQ9E
tKFS7xpAHm4aqREWw1dFihTwY0vInDSh8BzD/fnP7qffDZHv3njYVBl0NPsNB2Ce
XXnvUk+qmOdkUDUUHTfK+ZfqaeMcojlmmckysc4AdFZ6JnEHMAdeCJO6LLy+RV0c
39oML6t0LcEWHYPAHdcFNWyMXlMoHpnvvJLpeoaWRRyzg08VMhgj1CQ1ycPykjb1
q19CbZTo8qpgmMcm4sIFo0pdEUniOGHsP4NXCfQ2deRtn6Qs0R8Jvlc7EbVIYbQg
OqTrUMLcg3KGY+26c2CXa34a4rkUx3XLdHEKfBsEaOFJjTs6MVmkduABpMsvftSl
1itGSAgRQKArmdOYxHlKu6dGWW0jjFfymNuEQ/qBzgNKieJyDalRgvE7xqkld3Zt
tPPu0p3P0dc+vRbLXKzlxV2VYpWRt0orkO+u5p52mnBPnHNSaXU7DCaemwuI2VeW
9SYJH34WTzVkMADS3DBVpuvusHSGGedO96MmqLd3Wt9Dz72WR/Ag1ApM9ztceREQ
clWBk9Nu0gLcNu3YQHtADMNmWoC5WN7YXFq0IBSC4ShBJWYG0C+/UYM65AlPZ5+/
03dxbKeIP0SyWB2Rk2wBlUeS2uNmFUZvCHn4A6FbC8chJvdHzeU=
=E/w1
-----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.