[Yhc] broken build
Thomas Shackell
shackell at cs.york.ac.uk
Thu Jun 28 08:58:58 EDT 2007
Hi Kartik,
Unfortunately adding things to the prelude is a little more tricky than
other modules. Indeed if at all possible I would recommend adding it to
another module instead (perhaps your own module).
The problem is the compiler has a rather 'hacked' view of the Prelude (a
carry-over from the nhc98 source code). This means that it doesn't quite
generate quite the right .hi file for the Prelude. The problem you've
most likely got is that you've generated a .hi file that is missing the
Integral instance for Prelude.Integer. The best way to solve this is to
take the old Prelude.hi and modify it by hand to add your new
definitions. This is a little fiddly but the syntax should be fairly
obvious by looking at other examples.
Alternatively if you add your functions to some module other than the
Prelude then you don't get any of these problems at all and it all works
as expected.
Hope that helps
Tom
More information about the Yhc
mailing list