[Yhc] Some more changes to core

Neil Mitchell ndmitchell at gmail.com
Sun Aug 5 04:43:15 EDT 2007


Hi

> Indeed you don't, however, the yhc compiler only cares about being able
> to separate the module name so the change is sufficient for its purposes.
>
> To give a truely unique and unambiguous name something like
>
> Foo.Bar;Prelude.Eq;Foo.Bar.Baz;==
>
> would be necessary. This would also be a possible encoding if people
> thought it was preferable.

I would have thought the best encoding would be:

Foo.Bar;Foo.Bar.Baz;Prelude.Eq.==

OR

Prelude.Eq;Foo.Bar.Baz;Foo.Bar.==

In the first the rule for extracting module names is "up to the first
; or last .", in the second its "skip all bits before  ;" - and I'm
leaning towards the first. I read the first as "hey, I'm located in
Foo.Bar, I operate over Foo.Bar.Baz and I'm really just a type
specific version of Prelude.Eq.=="

Although I would be perfectly happy with 3 semi-colons - I think it is
important to know and track class dictionaries at the Core level.

Whatever scheme we do go with, I suggest a coreFunModule function be
added which obtains the module from a function name, and assuming
dictionaries are unambiguous, coreFunDictionary to split up the
pieces.

Thanks

Neil


More information about the Yhc mailing list