[Yhc] Adding base libraries to yhc

Neil Mitchell ndmitchell at gmail.com
Fri Dec 29 04:02:03 EST 2006


Hi Lane,

> I posted on the bug tracker earlier about doing this and now I am actually
> attempting it.

Fantastic!

> I went to darcs.haskell.org/packages/ and decided arbitrarily to start
> with Data.Map, which I copied into the packages/ directory in yhc.

When I did a half attempt at this, I also started with Data.Map.
However, that depends on Data.Typeable, which depends on
Data.HashTable which depends on virtually every evil bit of Haskell.
It was quite hard to find chunks of the base library which aren't
intertwined.


> As I understand it the preprocessor is turned off in yhc (thus the error).

By default, yes

> As far as I can tell nothing else in packages/ uses preprocessor
> directives.

> 1) I should enable -cpp specifically for this file or globally for all of
> yhc, or just for packages/.  (I'm not entirely sure how to get scons to do
> this but I need to take time and read the scons docs.)

I think this is the easiest one to do. I'd enable it for all packages/
in the scons script - compiling the other packages with -cpp is
unlikely to be an issue. Andrew can probably advise about the scons
side of things.


> 2) I should remove and work around the preprocessor directives.  If I
> start making changes how does yhc keep in sync with any changes that are
> made to the base packages upstream?

You are very likely to need to make changes the the base repo, quite
possibly substantial changes - often introducing new preprocessor
directives etc to cope with Yhc. Integrating these patches back into
the base library is definately a priority - once you have something
that does something useful (but not necessarily complete by any means)
we can contact the libraries@ list and set about getting the patches
applied.

Thanks

Neil


More information about the Yhc mailing list