[Hat] set Prelude modules as untrusted

Bernard Pope bjpop at cs.mu.OZ.AU
Wed Jul 13 05:05:51 EDT 2005


On Wed, 2005-07-13 at 09:56 +0100, Malcolm Wallace wrote:
> Kate Krastev <kate at ics.mq.edu.au> writes:
> 
> > Is it possible to set all/some Prelude modules to untrusted in Hat?
> > (So I can see exactly what calls what)
> 
> In src/hatlib/Makefile, search for occurrences of the flag '-trusted'
> and delete them.  Then you need to recompile the Hat prelude and
> libraries from scratch (make clean; make hat-lib) and re-install.

If you don't call too many Prelude functions then a _possibly_ cheaper
solution is to just duplicate the code for Prelude functions which
you /do/ use. Put them in some dummy module if necessary and import them
instead (maybe hiding the Prelude imports if you don't want to rename
them).

This gets a bit messy (nigh impossible) when you want to see calls made
to derived instances of type classes, but you may not need that level of
sophistication.

Cheers,
Bernie.



More information about the Hat mailing list