Re: [m-users.] IO argument clobbering

Volker Wysk <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
Am Montag, dem 17.07.2023 um 15:52 +0100 schrieb Sean Charles
(emacstheviking):
> Zoltan, Volker...... yes!
> 
> That makes it compile and run just fine.... I am not sure I fully comprehend but I will go and RTFM some more, that might help.

"in" is an abbreviation for "in(ground)". "ground" means normal data,
nothing callable. A predicate isn't ground. Its inst is like you have
defined it in your ":- inst callback == ...".

Cheers,
Volker

> 
> Thank you both.
> 
> 
> > On 17 Jul 2023, at 15:37, Zoltan Somogyi <[email protected]> wrote:
> > 
> > 
> > On 2023-07-17 16:27 +02:00 CEST, "Sean Charles (emacstheviking)" <[email protected]> wrote:
> > > :- type callback == (pred(world, world, io, io)).
> > > :- inst callback == (pred(in, out, di, uo) is det).
> > > 
> > > :- pred run_loop(
> > >    callback::in, world::in, world::out, io::di, io::uo
> > > ) is det.
> > 
> > Without compileable example code I cannot be sure, but I think
> > the problem is the "callback::in" in the declaration of run_loop.
> > What happens when you replace it with "callback:in(callback)"?
> > The mode checker needs this to tell it the mode of the higher order arg.
> > 
> > Zoltan.
> 
> _______________________________________________
> users mailing list
> [email protected]
> https://lists.mercurylang.org/listinfo/users

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

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmS1WTEACgkQ+K4ydFOs
HoU8jg/9HvFpT4UmBId04hTCCnnNerOa8yPnjTnYm5LYvKSg/lMrGK/V+VBTgpW+
K7w7D4tFAvApfcR07ryjLYJi8NeC3xWk9DDHDEXrKOkVqtfgE78acdGL1RB2YuD8
EAXCEI768JGm+RSpdRlCQYmMnWuc2AcPwON+HDe09AB/c/3xQHwvUDCOxVPfpckJ
Lc8eQRtPwVn510UCAM7RLCvFk/hE1iK0FO623SdiChPcvlAVvK8mSC8sI9IR4Ksy
sYks7z7uq6wCmm3NTSpbzi+1o4u6i+jXlhZ7t9cGJtGvJ/ynQBGLXyWzGIaql/au
n/cFtNa973Rr+Ans/nzb320FO9PO+GP3orG3HCv960wE+/JFn72Z0J3AZyN3kNw8
Wa304I+kBzrgp+OW9hUQHy7ELTTA1W8/VVtvcTVEtZZgyQZC4mBWXm7DF6spwJXd
f+k1Jr9RaPxBJdL5HCLRYhY/SWhvt1fZDccAJ3D0gl+1ROrl47jLwRXh9URQOfLX
LiRDoj0Ontr990Hc0R87aWg8UpRw7Qt4rb9UwCJSVRtt0Uvh026kSGjZrrO7MG3v
OKN+hl0ecWvoy3TV8gUWWP/cZvCDeqxueWDgjqOGHrWGD2oK7foHvGtiZps3QPVf
ly8t9BFtNp8hnrkJbjfjXarfCWUHQhAftfhvFfsh+TpG1swaLzw=
=PZTi
-----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.