1. 29 Aug, 2014 17 commits
    • Duncan Coutts's avatar
      Make binary a boot package · 227205e1
      Duncan Coutts authored
      Since ghc-pkg needs a relatively recent version.
      227205e1
    • Duncan Coutts's avatar
      Drop ghc library dep on Cabal · 9597a258
      Duncan Coutts authored
      9597a258
    • Duncan Coutts's avatar
      Move Cabal Binary instances from bin-package-db to ghc-pkg itself · 0af7d0c1
      Duncan Coutts authored
      The ghc-pkg program of course still depends on Cabal, it's just the
      bin-package-db library (shared between ghc and ghc-pkg) that does not.
      0af7d0c1
    • Duncan Coutts's avatar
      Use ghc-local types for packages, rather than Cabal types · 27d6c089
      Duncan Coutts authored
      Also start using the new package db file format properly, by using the
      ghc-specific section.
      
      This is the main patch in the series for removing the compiler's dep
      on the Cabal lib.
      27d6c089
    • Duncan Coutts's avatar
      Introduce new file format for the package database binary cache · 8d7a1dcd
      Duncan Coutts authored
      The purpose of the new format is to make it possible for the compiler
      to not depend on the Cabal library. The new cache file format contains
      more or less the same information duplicated in two different sections
      using different representations.
      
      One section is basically the same as what the package db contains now,
      a list of packages using the types defined in the Cabal library. This
      section is read back by ghc-pkg, and used for things like ghc-pkg dump
      which have to produce output using the Cabal InstalledPackageInfo text
      representation.
      
      The other section is a ghc-local type which contains a subset of the
      information from the Cabal InstalledPackageInfo -- just the bits that
      the compiler cares about.
      
      The trick is that the compiler can read this second section without
      needing to know the representation (or types) of the first part. The
      ghc-pkg tool knows about both representations and writes both.
      
      This patch introduces the new cache file format but does not yet use it
      properly. More patches to follow. (As of this patch, the compiler reads
      the part intended for ghc-pkg so it still depends on Cabal and the
      ghc-local package type is not yet fully defined.)
      8d7a1dcd
    • Duncan Coutts's avatar
      Improve the ghc-pkg warnings for missing and out of date package cache files · ce29a260
      Duncan Coutts authored
      In particular, report when it's missing, and also report it for ghc-pkg check.
      Also make the warning message more explicit, that ghc will not be able to
      read these dbs, even though ghc-pkg may be able to.
      ce29a260
    • Duncan Coutts's avatar
      Drop support for single-file style package databases · 557c8b8c
      Duncan Coutts authored
      Historically the package db format was a single text file in Read/Show
      format containing [InstalledPackageInfo]. For several years now the
      default format has been a directory with one file per package, plus a
      binary cache.
      
      The old format cannot be supported under the new scheme where the
      compiler will not depend on the Cabal library (because it will not
      have access to the InstalledPackageInfo type) so we must drop support.
      It would still technically be possible to support a single text file
      style db (but containing a different type), but there does not seem to
      be any compelling reason to do so.
      
      (Part of preparitory work for removing the compiler's dep on Cabal)
      557c8b8c
    • Duncan Coutts's avatar
      Simplify conversion in binary serialisation of ghc-pkg db · 69e9f6e4
      Duncan Coutts authored
      We can serialise directly, without having to convert some fields to
      string first.
      
      (Part of preparitory work for removing the compiler's dep on Cabal)
      69e9f6e4
    • Simon Peyton Jones's avatar
      Testsuite wibbles · b2affa0f
      Simon Peyton Jones authored
      b2affa0f
    • Simon Peyton Jones's avatar
      9fae6919
    • Simon Peyton Jones's avatar
      In GHC.Real, specialise 'even' and 'odd' to Int and Integer · db5868cf
      Simon Peyton Jones authored
      This was previously happening by a fluke -- they were called with those types
      in GHC.Real itself -- but my recent changes to specialisation mean that auto
      specialisations like these are not necessarily exported.
      
      Losing those specialisations made a huge difference to two performance tests
         perf/should_run/MethSharing
         perf/should_run/T9339
      db5868cf
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      Define mapUnionVarSet, and use it · dfc9d309
      Simon Peyton Jones authored
      Call sites are much easier to understand than before
      dfc9d309
    • Simon Peyton Jones's avatar
    • Simon Peyton Jones's avatar
      White space only · 7eae1417
      Simon Peyton Jones authored
      7eae1417
    • Simon Peyton Jones's avatar
      Fix syntax in perf/compiler/all.T · 4a87142f
      Simon Peyton Jones authored
      4a87142f
    • Simon Peyton Jones's avatar
      Improve trimming of auto-rules · 49370ced
      Simon Peyton Jones authored
      I hadn't got the new function trimAutoRules quite right, so we had
      a left-over rule which mentioned a local variable whose binding had
      been discarded.  (Result: crash when compiling Haddock.)
      
      This patch merges trimAutoRules into an expanded version of
      findExternalRules, gets it right, and adds lots of comments.
      
      See Note [Finding external rules].
      
      And indeed in one regression test we get to trim off more rules
      (and hence code) than before.
      49370ced
  2. 28 Aug, 2014 23 commits