[Yhc] Some more changes to core

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Mon Aug 6 12:48:13 EDT 2007


> >     module Foo
> >
> >     foo x = bar x
> >       where
> >       bar x = ...
> >
> > generates
> >
> >     Foo.Foo.Prelude.200.bar v217 v218 = ...

I don't see where the Prelude bit came from, but I'm assuming that the
second "Foo" was a typo for lower-case "foo".

> so why not Foo.200_bar, which is still unique, and entirely unambiguous.

FWIW, my preference would be to keep a reference to the enclosing
function name in the local name, e.g.

       Foo.foo.200.bar

This style has the advantage of remaining decipherable by the careful
reader.  "bar" is a local definition within "Foo.foo", and because there
are potentially many different local "bar"s within different clauses of
"Foo.foo", the number disambiguates.  Even better if the number was
essentially a line number or similar (clause number?), to make it even
more readable.

Regards,
    Malcolm


More information about the Yhc mailing list