Add haskell-src as an official machine-readable component of the Haskell standard

Ben Millwood haskell at benmachine.co.uk
Tue Nov 16 09:35:03 EST 2010


On Tue, Nov 16, 2010 at 9:13 AM, Yitzchak Gale <gale at sefer.org> wrote:
> I propose that the haskell-src package be renamed
> haskell20nn-src for each revision Haskell 20nn of
> the standard, and be made an official machine-readable
> component of the standard.
>

As much as I like the idea of standardising a representation of
Haskell syntax, it's a highly nontrivial library and so coming to
consensus on the various design decisions involved in producing the
AST and so forth would be thorny if we started demanding that every
implementation upheld them. I think that in general, libraries in the
Report should be minimal, and generally only provide "obvious" or
primitive constructs which would likely be the same in every
implementation, and on which can be built more interesting libraries
separately.

It would become necessary to include this sort of thing, I think, if
we ever wanted something like Template Haskell or any other
metaprogramming facilities to be included in the language. But I don't
think anyone believes that TH or anything like it is ready for
inclusion in haskell' yet.

(Examples of controversies possible in haskell-src: we have the Hs
prefix on constructors everywhere, we can't provide fixity information
(and the haskell-src-exts implementation of this is unsatisfactory in
several important ways), a lot of type class instances are absent
(even Ord!), the distribution of SrcLocs is a little awkward when
manipulating source abstractly, and some constructors allow impossible
values, e.g. HsLambda can contain zero patterns)


More information about the Haskell-prime mailing list