[Haskell-cafe] Re: Interest in helping w/ Haskell standard

Jon Fairbairn Jon.Fairbairn at cl.cam.ac.uk
Fri Oct 14 11:58:39 EDT 2005

On 2005-10-14 at 16:56+0200 Stephane Bortzmeyer wrote:
> On Fri, Oct 14, 2005 at 03:34:33PM +0100,
>  Jon Fairbairn <Jon.Fairbairn at cl.cam.ac.uk> wrote:
> > > Because the language used inside these strings is standard,
> > > multi-language, widely used and documented?
> > 
> > 10,000 lemmings can't be wrong?
> Right, disregard ASCII and specify the lexemes of Haskell
> 2 in a new encoding scheme, much better than ASCII :-)

Haskell 98 isn't ASCII, but Unicode (Report, 2.1), current
compiler inadequacies notwithstanding. So we've done that
already. (And incidentally I'm on record as having argued
for ASCII rather than Unicode for Haskell source).

> > Not even the syntax of such regexps is checked at compile time.
> Of course, from the compiler's PoV, they are just strings.

That's what I'm complaining about.

> May be a new form of strings, like in Perl, to show that
> this is a regexp?

That's what I'm suggesting.

> > Since Unicode is increasingly adopted, we could just use «regexp»
> The Unicode standard for regexps, UTR #18
> (http://www.unicode.org/reports/tr18/) uses the very same standard
> syntax that you criticize.

So if we must have a short-form syntax, perhaps we should
use that one as I already intimated. However, as I read that
report, it's a standard way of adapting (any, standard or
otherwise) REs to handle unicode, not a standardisation of
regexps per se. Specifically

   Note: This is only a sample syntax for the purposes of
   examples in this document. (Regular expression syntax
   varies widely: the issues discussed here would need to be
   adapted to the syntax of the particular
   implementation. [...]

So it's not a Unicode standard for the syntax of regexps.


Jón Fairbairn                              Jon.Fairbairn at cl.cam.ac.uk

More information about the Haskell-Cafe mailing list