Re: [m-users.] Creating an interface module
Volker Wysk <[email protected]>
| Newsgroups | gmane.comp.lang.mercury.general |
|---|---|
| Message-ID | <[email protected]> |
Am Freitag, dem 14.07.2023 um 17:41 +1000 schrieb Peter Wang: > On Tue, 11 Jul 2023 16:59:42 +0200 Volker Wysk <[email protected]> wrote: > > Hi > > > > In Haskell, you can import things into a first module from a second module > > and reexport them from the first one. So you can use the first module as an > > interface to things from several modules. > > > > This doesn't seem to be possible in Mercury. You need to import all the > > modules which contain parts of what you need. > > > > Submodules don't seem to be the answer. > > > > Am I missing something? What is the recommended practice when you want to > > split a library into several modules? > > Mercury's module system is pretty basic and doesn't support > re-exporting. I can think of a solution that looks easy to implement. In a module there could be some statement ":- import_as_well(...)", which tells the compiler to import some other modules as well, when the module with the statement is being imported. 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+K4ydFOsHoUFAmSxAP4ACgkQ+K4ydFOs HoUV+hAAqbmM0Ine7TnpT2HFaKTgmsKig7cB0fBCJWznHHqnTnsy59RFLpEDd2di +EryPglrhUqQ4cz4ZezMujTLKFqFfRLRpos2YGgJTSUVUCca8X6322gf3Na2IVnP y6h8Yc0TOvpjyvBh5xTmysfFB6Lr4NtzAZhHrahRI/YfzuvCDWrnN/7Q8JX2UgQK 3lV0zxCvbZbKqd9FgayWV86yNiLbRQrbyHokmYjjo5li+RQ5Kr9lN4xW842skP1W Hjr5VzNanG0rDJP0Lp63pVf+xezfMuxp+2K5uHKaXn64z0/mX0xS7uulVjYUr3y9 hq02Z1KVRFAYI0bi69pSQYw7dcRSZ03XA1WmblV4MwHhMahf8n31jm3W4wYhqzmt YeJkRAbNLLZUtxls4ME4DXBjk+oYVn8I4bIjny4xO/B7zlS9ZYV2/2VNIngZDRrc 3HhmEFaIEJyiuo1Qsz5QSnlCHr7Cgglh+FRkchUV9VPNt3Fc4KDCOYM70nPOfS9R ykKAeVQUXcHTw2PebRphwC7mvj+BpPNnzfHgd/oRWXbVaP9/tQpQ6sHkBlHys6wQ b4WNa/IMCbCUT0WtosBJr8+Sfkock7af9Ylm5mxHO3PeCuqSxLJnmRH19Ahso8IP Oo/Sm1P9PazTJoLKQKuExfI+OiHxavPwz2gCcE35NxiapFmR9qs= =4sZx -----END PGP SIGNATURE-----