[m-dev.] syntax proposals
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Nov 16 02:10:33 AEDT 2001
On 07-Nov-2001, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> One thing that I find aesthetically distressing is that we currently
> have different syntax for declarations at the top-level and for nested
> declarations such as with typeclass and instances.
>
> This stems from using lists to group nested declarations and
> definitions. Can we introduce a different kind of `list' for this
> purpose which perserves the top-level syntax.
That would be techically feasible, yes.
One complication would be that the parser might have to
do a smarter job of error recovery. Currently we just
use the very simple algorithm of skipping to the next
item, but once you have significant nesting outside the
items, then that strategy can lead to a whole swathe of
spurious errors if e.g. a nesting terminator is accidentally
omitted.
Of course, we have that problem with nested modules already.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list