| > +       ; dflags <- getDOpts
| > +       ; if not (dopt Opt_Specialise dflags) then
| > +            return []    -- Ignore SPECIALISE pragmas for imported things
| > +                    -- when -O is not on; otherwise we get bogus
| > +                    -- complaints about lack of INLINABLE pragmas
| > +                    -- in the imported module (also compiled without -O)
| > +                    -- Notably, when Haddocking the base library
| 
| Don't we actually want to ignore SPECIALISE pragmas if the module the
| thing was imported from was compiled without -O, rather than if the
| importing module is being compiled without -O?

Yes, we want the former, but we don't have a way to answer that question at the 
moment.  So this is a crude approximation.

| The patch from Simon doesn't seem to fix the issue for me either. And it
| seems it can't --- the haddock is called (at least for me) with
| "--optghc=-O" so testing for Opt_Specialise will return True. I've run
| haddock by hand without optimization and as expected haddock doesn't
| fail. So the questions are: why is haddock called with --optghc=-O and
| why is it failing with it?    

A second question is this: if haddock is compiling with -O why doesn't the 
unfolding appear in the interface file.  

I don't know how to fix the first problem easily; maybe the second is easier?

Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to