Hi John,

On Wed, Jan 19, 2005 at 08:35:13AM -0600, John Goerzen wrote:
> 
> Although its manpage implies that hmake handles proprocessor flags
> automatically in all cases, it dies compiling files that use HaXml
> because it tries to process the GHC code (which happens to occur first)
> instead of the nhc98 code.  As far as I can tell, it doesn't even manage
> to invoke nhc98.
> 
> I even tried:
> 
> HFLAGS="-cpp" hmake -cpp -IHaXml-1.12/src -nhc98 -o dtmconv dtmconv.hs
> 
> It made no difference.

Your report is rather vague. If I use HaXml from
http://www.haskell.org/HaXml/HaXml-1.12.tar.gz and run

    hmake -cpp -IHaXml-1.12/src -nhc98 -o dtmconv dtmconv.hs

(the HFLAGS="-cpp" doesn't affect the output and I would advise against
using it) then I get:

    Fail: Can't find module System.IO.Unsafe in user directories
            .
            HaXml-1.12/src
      Or in installed libraries/packages at
            /usr/include/nhc98
      Asked for by: HaXml-1.12/src/Text/XML/HaXml/Parse.hs
      Fix using the -I, -P, or -package flags.

    Stop - hmake dependency error.

Is this the problem you're having?

This is because HaXml-1.12/src/Text/XML/HaXml/Parse.hs contains

    if defined(__GLASGOW_HASKELL__) && ( __GLASGOW_HASKELL__ > 502 )
    import System.IO.Unsafe (unsafePerformIO)
    #elif defined(__GLASGOW_HASKELL__) || defined(__HUGS__)
    import IOExts (unsafePerformIO)
    #elif defined(__NHC__) && ( __NHC__ > 114 )
*   import System.IO.Unsafe (unsafePerformIO)
    #elif defined(__NHC__)
    import IOExtras (unsafePerformIO)
    #elif defined(__HBC__)
    import UnsafePerformIO
    #endif

(it is the line I have marked with a * that it is complaining about),
System.IO.Unsafe is in package base and hmake wasn't looking in the base
package by default.

Version 3.09-2 should fix the above issue. If that doesn't solve your
problem then please can you give me step by step instructions to
reproduce the problem and say exactly what error you get?

If that was the problem, please can you close this bug (or let me know
and I'll do it).


Incidentally,

    hmake -cpp -IHaXml-1.12/src -nhc98 -o dtmconv dtmconv.hs

now gives

    Fail: Can't find module System.Posix.Time in user directories
            .
            HaXml-1.12/src
      Or in installed libraries/packages at
            /usr/include/nhc98
            /usr/include/nhc98/base
      Asked for by: dtmconv.hs
      Fix using the -I, -P, or -package flags.
    
    Stop - hmake dependency error.

which looks like an unportability in your code.


Thanks
Ian



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to