character syntax

Remi Turk remi@abcweb.nl
Sat, 9 Feb 2002 00:26:05 +0100


--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Feb 07, 2002 at 08:00:36AM -0800, Ian Zimmerman wrote:
>=20
> I am new to the language (coming from ML) and I am sorry if my first
> post turns out to be a flamebait, but I can't help it:
>=20
> Why in the world did the designers of Haskell permit the ' character
> to be both a prime (part of identifiers) and the single-character
> quote?  Didn't they realize what they were doing to would-be
> intelligent editors?  Or were they just a bunch of rabid ed users?
>=20
> Has anyone found a way to deal with this in Emacs, _correctly_?  That
> is, among other things, '(' should be ignored for sexp parsing...

I'm just back from a party so I may be, eh, a little bit drunk ;-)
but I really don't see the problem.
An identifier in Haskell cannot begin with a ' so if a
"could-be-identifier" ;-) starts with a ' it is a character constant.
It is completely parallel to digits AFAICS: An identifier may
contain digits, but it cannot begin with one.
So a "could-be-identifier" beginning with a digit is a number.

	Remi

--=20
See the light and feel my warm desire,
Run through your veins like the evening sun
It will live but no eyes will see it,
I'll bless your name before I die.

Key fingerprint =3D CC90 A1BA CF6D 891C 5B88  C543 6C5F C469 8F20 70F4

--17pEHd4RhPHOinZp
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8ZF6MbF/EaY8gcPQRAoMGAKChiUhataniE/aH26wn5i8XPXD+owCghrCG
wIXF8SipY1H5KdIy5lTMFtw=
=BLgV
-----END PGP SIGNATURE-----

--17pEHd4RhPHOinZp--