Re: -t doesn't link

Malcolm Wallace <[email protected]> Tue, 2 Nov 2004 09:56:56 +0000
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
Ian Lynagh <[email protected]> writes:

> Even trivial programs don't link for me if I use the -t flag:
> 
> undefined reference to `FN_NHC_46Internal_46_95apply1'

Sadly, the time profiling features of nhc98 have not been maintained
properly since the student who wrote them moved on.  It looks like a
change in the internal library structure in 1.16 has broken something.

It may be possible to rectify if you study src/prelude/Makefile
carefully and check that all the current libraries are mentioned in
the section beginning:
    ifeq "${TPROF}" "z"
I suspect that "NHC.Internal" is missing - there may be others too.
If you find a fix, send in the patch.

>   "if sh --version | grep -i gnu >/dev/null"
> in tprofprel should probably be
>   "if sh --version 2> /dev/null | grep -i gnu >/dev/null" or somesuch.

Yup, good point.
Regards,
    Malcolm