[Yhc] Some more changes to core

Neil Mitchell ndmitchell at gmail.com
Sun Aug 5 06:35:55 EDT 2007


> Okay. As a little side note, you won't believe how nhc98 stores local
> functions (which I've just discovered)
>     module Foo
>     foo = ..
>       where bar = ...
> The name Foo.Foo.Prelude.200.bar is actually stored in nhc98 as an
> instance dictionary!
>      - defined in the module Foo
>      - on the datatype Prelude.200, i.e. the two hundred tuple!?!
>      - to the class(!?) Foo.Foo.bar
> Yes, really. Thus currently my code encodes the name as
>     Foo;Prelude.(,,,,, ... ,,,,,,,,);Foo.Foo.bar


> The fiddly bit is going to be deciding that this isn't an instance
> dictionary but is actually a locally defined function ... *sigh*

Isn't the solution to change this at generation time? I would have
thought it was hard to fix up later.



More information about the Yhc mailing list