GHCI Can't Find Module But GHC Can

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Wed, 26 Jun 2002 14:57:02 +0100


> >    ___         ___ _
> >   / _ \ /\  /\/ __(_)
> >  / /_\// /_/ / /  | |      GHC Interactive, version 5.02.3, 
> > for Haskell 98.
> > / /_\\/ __  / /___| |      http://www.haskell.org/ghc/
> > \____/\/ /_/\____/|_|      Type :? for help.
> > 
> > Loading package std ... linking ... done.
> > Loading package lang ... linking ... done.
> > Loading object (static) SVG-part1.o ... done.
> > Loading object (static) SVG-part2.o ... done.
> > ...
> > final link ... done.
> > can't find module `IOMisc'
> > Prelude>
> 
> Where is the module IOMisc located?  Does it have source or binary files
> or both?

I think the problem is that GHCi doesn't respect #ifdef conditional compilation.
The HaXml package has modules with stuff like

    #if defined(__HBC__)
    import IOMisc
    #endif

which seems to confuse the interpreter (but not the compiler).  I've
also seen reports that recent versions of GHC don't grok lines like

    #if __GLASGOW_HASKELL__ <= 210

Regards,
    Malcolm