[MLton] Ad-hoc infix identifiers, Printf, and libraries

skaller skaller@users.sourceforge.net
Fri, 15 Jul 2005 04:26:13 +1000


--=-VGnSPm31L+K0pW328GYY
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2005-07-14 at 19:27 +0200, Andreas Rossberg wrote:
> Vesa Karvonen wrote:
> >=20
> > I'm not exactly sure what you have in mind.
>=20
> Consider library A defining operators P, Q, R, and library B defining=20
> operators U, V, W. I can only specify the relative precedences of=20
> operators within one of the libraries. I cannot specify any=20
> inter-library precedences without creating a dependency between the=20
> libraries. Still such precedences might be useful.
>=20
> > One could, for example, introduce virtual or place-holder operators for
> > making it easier to combine groups of precedences.  Basically, a librar=
y
> > would introduce fixity declarations that are only used for the purpose =
of
> > allowing users to declare precedences relative to the actual operators
> > in the library robustly and conveniently.

How does this sound:

* precedences are just grammars
* grammar productions are just type constructors
* use polymorphic variants

and then just use the usual open recursion technique.

--=20
John Skaller <skaller at users dot sourceforge dot net>


--=-VGnSPm31L+K0pW328GYY
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBC1q5EsRp8/9aGVGsRAsedAKCKhELHzoJ1O2j6nyYrgFg5U2WDVQCZAUaK
ED5U5Lgu60hMIYoH9zcl15c=
=VJHK
-----END PGP SIGNATURE-----

--=-VGnSPm31L+K0pW328GYY--