oops.  *now* I've pushed it

S

commit 1bf40a4b38180b8b1c1bdaf4919bc327d5b27abe
Author: Simon Peyton Jones <[email protected]>
Date:   Mon Jun 13 13:37:47 2011 +0100

    Fix the SPECIALISE error in the haddock invocation of validate
    
    Specifically
     - Turn the error
           "You cannot SPECIALISE f because it is not INLINEABLE"
       into a warning
    
     - More importantly, suppress it altogether when
         HscTarget = HscNothing or HscInterpreted
       because then we aren't going to be generating unfoldings


| -----Original Message-----
| From: Simon Peyton-Jones
| Sent: 13 June 2011 13:42
| To: Simon Peyton-Jones; Ian Lynagh; [email protected]
| Subject: RE: [commit: ghc] master: Without -O do not complain about SPECIALISE
| pragmas for non-INLINABLE things (d8d65a2)
| 
| OK.  I've pushed a patch that makes the check test also for HscTarget = 
HscNothing.
| This seems to fix it.
| 
| (I'm still getting that ghcpkg05 failure though.)
| 
| Simon
| 
| | -----Original Message-----
| | From: [email protected] [mailto:[email protected]] On 
Behalf Of
| | Simon Peyton-Jones
| | Sent: 13 June 2011 08:50
| | To: Ian Lynagh; [email protected]
| | Subject: RE: [commit: ghc] master: Without -O do not complain about 
SPECIALISE
| | pragmas for non-INLINABLE things (d8d65a2)
| |
| | | > +       ; 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


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

Reply via email to