1. 02 Dec, 2011 2 commits
    • Ian Lynagh's avatar
      Move includes/DerivedConstants.h and includes/GHCConstants.h into dist dirs · e8723129
      Ian Lynagh authored
      When they existed, they were getting included in the includes_H_FILES
      variable (as it uses wildcard to find all header files). But the
      .depends files for the programs that generate the headers depend on
      $(includes_H_FILES), so the .depends files looked out-of-date once the
      headers had been created. This caused unnecessary make reinvocations.
      
      So now we put them in dist* directories, where they ought to be anyway.
      e8723129
    • Ian Lynagh's avatar
      Use touchy rather than touch when building on Windows · 2694bb74
      Ian Lynagh authored
      With Windows 7 in a vitrual box VM on OS X, some very odd things happen
      with dates and time stamps when SSHing into cygwin. e.g. here the
      "Change" time is in the past:
      
      $ date; touch foo; stat foo
      Fri Dec  2 16:58:07 GMTST 2011
        File: `foo'
        Size: 0               Blocks: 0          IO Block: 65536  regular
      empty file
      Device: 540aba0bh/1409989131d   Inode: 562949953592977  Links: 1
      Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: (  513/    None)
      Access: 2011-12-02 16:58:07.414457900 +0000
      Modify: 2011-12-02 16:58:07.414457900 +0000
      Change: 2011-12-02 16:58:03.495141800 +0000
       Birth: 2011-12-02 16:57:57.731469900 +0000
      
      And if we copy such a file, then the copy is older (as determined by the
      "Modify" time) than the original:
      
      $ date; touch foo; stat foo; cp foo bar; stat bar
      Fri Dec  2 16:59:10 GMTST 2011
        File: `foo'
        Size: 0               Blocks: 0          IO Block: 65536  regular
      empty file
      Device: 540aba0bh/1409989131d   Inode: 1407374883725128  Links: 1
      Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: (  513/    None)
      Access: 2011-12-02 16:59:10.118457900 +0000
      Modify: 2011-12-02 16:59:10.118457900 +0000
      Change: 2011-12-02 16:59:06.189477700 +0000
       Birth: 2011-12-02 16:57:57.731469900 +0000
        File: `bar'
        Size: 0               Blocks: 0          IO Block: 65536  regular
      empty file
      Device: 540aba0bh/1409989131d   Inode: 281474976882512  Links: 1
      Access: (0644/-rw-r--r--)  Uid: ( 1000/     ian)   Gid: (  513/    None)
      Access: 2011-12-02 16:59:06.394555800 +0000
      Modify: 2011-12-02 16:59:06.394555800 +0000
      Change: 2011-12-02 16:59:06.395532400 +0000
       Birth: 2011-12-02 16:58:40.921899600 +0000
      
      This means that make thinks that things are out of date when it
      shouldn't, so reinvokes itself repeatedly until the MAKE_RESTARTS
      infinite-recursion test triggers.
      
      The touchy program, like most other programs, creates files with both
      Modify and Change in the past, which is still a little odd, but is
      consistent, so doesn't break make.
      2694bb74
  2. 01 Dec, 2011 5 commits
  3. 30 Nov, 2011 9 commits
    • Ian Lynagh's avatar
      Fix parsing of OPTIONS*/LANGUAGE pragmas in haddock mode · b3e30449
      Ian Lynagh authored
      When getting options from basicTypes/RdrName.lhs, we were seeing
      text like "-- |\n-- ...\n" in the buffer, and lexer then recognises
      "-- |\n-- ..." as a complete ITdocCommentNext token, with the end of
      the buffer not reached.
      
      Next time round, when we get more input into the buffer, it started
      "\n-- * 'Var.Var': see", so the lexer gave us an ITdocSection token.
      
      However, getOptions' only knew about ITdocCommentNext, and so it
      stopped at that point, and didn't see the pragmas further down the file.
      This caused the build to fail due to -fwarn-tabs not being turned off.
      
      But actually, we don't really want the haddock docs at this point, so
      now we just unset Opt_Haddock in getOptionsFromFile.
      b3e30449
    • Ian Lynagh's avatar
    • Simon Marlow's avatar
      Include a stack trace in the panic message, when GHC is compiled profiled. · f85c084c
      Simon Marlow authored
      I tried this out on the panic we're currently getting for #3103:
      
      ghc-stage2: panic! (the 'impossible' happened)
        (GHC version 7.3.20111128 for x86_64-unknown-linux):
              tcIfaceGlobal (local): not found:
          base:GHC.Word.W#{d 6w}
          [(32R, Type constructor `base:GHC.Word.Word{tc 32R}'),
           (r6O, Identifier `base:GHC.Word.$fNumWord{v r6O}'),
           (r6P, Identifier `base:GHC.Word.$fEqWord{v r6P}'),
           (r6Q, Identifier `base:GHC.Word.$fNumWord1{v r6Q}'),
           (r6R, Identifier `base:GHC.Word.$fNumWord2{v r6R}'),
           (r6S, Data constructor `base:GHC.Word.W#{d r6S}'),
           (r6U, Identifier `base:GHC.Word.W#{v r6U}'),
           (r75, Identifier `base:GHC.Word.$fNumWord_$csignum{v r75}'),
           (r76, Identifier `base:GHC.Word.$fEqWord_$c/={v r76}'),
           (r77, Identifier `base:GHC.Word.$fEqWord_$c=={v r77}')]
      { Main.main
         GHC.defaultErrorHandler
          GHC.runGhc
           GhcMonad.>>=
            GhcMonad.>>=.\
             Main.main'
              Main.doMake
               GhcMake.load
                GhcMake.load2
                 GhcMake.upsweep
                  GhcMake.upsweep.upsweep'
                   GhcMake.reTypecheckLoop
                    GhcMake.typecheckLoop
                     GhcMake.typecheckLoop.\
                      TcRnMonad.initIfaceCheck
                       TcRnMonad.initTcRnIf
                        IOEnv.runIOEnv
                         IOEnv.thenM
                          IOEnv.thenM.\
                           TcIface.typecheckIface
                            TcIface.typecheckIface.\
                             LoadIface.loadDecls
                              LoadIface.loadDecl
                               TcIface.tcIfaceDecl
                                TcIface.tc_iface_decl
                                 TcIface.tcIdInfo
                                  MonadUtils.foldlM
                                   TcIface.tcIdInfo.tcPrag
                                    TcIface.tcUnfolding
                                     TcIface.tcPragExpr
                                      TcIface.tcIfaceExpr
                                       TcIface.tcIfaceAlt
                                        TcIface.tcIfaceDataCon }
      f85c084c
    • Simon Marlow's avatar
      Further tweaks to the ccs primops · 1fc25dfd
      Simon Marlow authored
       - add getCCSOf# :: a -> State# s -> (# State# s, Addr# #)
         (returns the CCS attached to the supplied object)
      
       - remove traceCcs# (obsoleted by getCCSOf#)
      
       - rename getCCCS# to getCurrentCCS#
      1fc25dfd
    • Simon Marlow's avatar
      remove obsolete notes (#5660) · b35a12aa
      Simon Marlow authored
      b35a12aa
    • Simon Marlow's avatar
      53055bb5
    • Ian Lynagh's avatar
      2d68dbbb
    • Ian Lynagh's avatar
    • Simon Peyton Jones's avatar
  4. 29 Nov, 2011 17 commits
  5. 28 Nov, 2011 7 commits
    • Ian Lynagh's avatar
      Implement a capi calling convention; fixes #2979 · 36f8cabe
      Ian Lynagh authored
      In GHC, this provides an easy way to call a C function via a C wrapper.
      This is important when the function is really defined by CPP.
      
      Requires the new CApiFFI extension.
      
      Not documented yet, as it's still an experimental feature at this stage.
      36f8cabe
    • dimitris's avatar
      825e0a3e
    • dimitris's avatar
      isReflCo no longer reliable for detection of type identity. · e5449309
      dimitris authored
      Details:
      isReflCo is no longer reliable for detection of no-rewriting/flattening
      since we are using cached reflexivity solved goals. Introduced a boolean
      flag in the flattener for this purpose, instead.
      e5449309
    • dimitris's avatar
      Implemented -dsuppress-var-kinds flag to remove silly kinds when dppr-debug is on. · cae91683
      dimitris authored
      Adding commentary, and fixing a knot-tie related bug.
      
      Commentary only.
      cae91683
    • dimitris's avatar
      Solved goal caching and zonking optimisations. · 4bc84da3
      dimitris authored
      1) Stopped rewriting and caching solveds in the inerts because
      profiling showed that a lot of time was spent on rewriting
      already solved goals.
      
      2) Optimisations in zonkEvBinds for common-case
      evidence bindings generated from the constraint solver.
      
      3) Now solved goals cache their evidence terms, so that we can more
      aggressively optimize Refl coercions during constraint solving.
      This patch also includes a rewrite of rewriteInertEqsFromInertEq
      which greatly improves its efficiency.
      4bc84da3
    • dimitris's avatar
      This patch includes: · f3183d9a
      dimitris authored
      0) Typo in panic message.
      1) prioritization of equalities over family equalities in the worklists.
      2) rewriting of inert substitutions and solveds on-the-spot instead of
         kicking them out in the inerts. This required a monadic map over
         substitutions hence the modifications in UniqFM.
      3) Just comments and removing stale commented code.
      
      4) Useful SCC for simplifyInfer.
      
      5) Making CoreStats outputable.
      f3183d9a
    • Simon Marlow's avatar
      57d657a8