1. 05 Aug, 2014 1 commit
    • Edward Z. Yang's avatar
      Package keys (for linking/type equality) separated from package IDs. · 66218d15
      Edward Z. Yang authored
      
      
      This patch set makes us no longer assume that a package key is a human
      readable string, leaving Cabal free to "do whatever it wants" to allocate
      keys; we'll look up the PackageId in the database to display to the user.
      This also means we have a new level of qualifier decisions to make at the
      package level, and rewriting some Safe Haskell error reporting code to DTRT.
      
      Additionally, we adjust the build system to use a new ghc-cabal output
      Make variable PACKAGE_KEY to determine library names and other things,
      rather than concatenating PACKAGE/VERSION as before.
      
      Adds a new `-this-package-key` flag to subsume the old, erroneously named
      `-package-name` flag, and `-package-key` to select packages by package key.
      
      RFC: The md5 hashes are pretty tough on the eye, as far as the file
      system is concerned :(
      
      ToDo: safePkg01 test had its output updated, but the fix is not really right:
      the rest of the dependencies are truncated due to the fact the we're only
      grepping a single line, but ghc-pkg is wrapping its output.
      
      ToDo: In a later commit, update all submodules to stop using -package-name
      and use -this-package-key.  For now, we don't do it to avoid submodule
      explosion.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, simonmar, hvr, austin
      
      Subscribers: simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D80
      66218d15
  2. 04 Aug, 2014 1 commit
    • kgardas's avatar
      fix linker_unload test on Solaris/i386 platform · 65e5dbcd
      kgardas authored
      Summary:
      This patch set fixes two issues in linker_unload test case
      on Solaris/i386 platform. First there is an issue in linker_unload.c
      which causes warning to be emitted about _FILE_OFFSET_BITS redefined.
      This is solved by including ghcconfig.h as a first header file.
      Another issue is that on Solaris and its builders we use to configure
      ghc with --with-gmp-libraries=/usr/lib and this causes issue with
      test case Makefile's logic. It attempts to start linker_unload
      and pass it HSinteger-gmp library for unload, but the library
      name is prefixed with two directories names. The first is of
      ghc's integer-gmp/build itself and another is the directory name
      passed to --with-gmp-libraries= configure parameter. In case
      of Solaris this is /usr/lib. The testcase then fails on unloading
      integer-gmp/build directory thinking that this is a library to unload.
      This issue is solved by cuting the first library name from the list
      and using this for unloading the HSinteger-gmp library.
      
      Test Plan: validate
      
      Reviewers: ezyang, austin
      
      Reviewed By: ezyang, austin
      
      Subscribers: phaskell, simonmar, relrod, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D110
      65e5dbcd
  3. 02 Aug, 2014 5 commits
  4. 01 Aug, 2014 7 commits
  5. 31 Jul, 2014 7 commits
  6. 29 Jul, 2014 1 commit
  7. 28 Jul, 2014 2 commits
  8. 26 Jul, 2014 1 commit
    • Edward Z. Yang's avatar
      Module reexports, fixing #8407. · 7f5c1086
      Edward Z. Yang authored
      
      
      The general approach is to add a new field to the package database,
      reexported-modules, which considered by the module finder as possible
      module declarations.  Unlike declaring stub module files, multiple
      reexports of the same physical package at the same name do not
      result in an ambiguous import.
      
      Has submodule updates for Cabal and haddock.
      
      NB: When a reexport renames a module, that renaming is *not* accessible
      from inside the package.  This is not so much a deliberate design choice
      as for implementation expediency (reexport resolution happens only when
      a package is in the package database.)
      
      TODO: Error handling when there are duplicate reexports/etc is not very
      well tested.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Conflicts:
      	compiler/main/HscTypes.lhs
      	testsuite/.gitignore
      	utils/haddock
      7f5c1086
  9. 25 Jul, 2014 3 commits
    • Joachim Breitner's avatar
      Update test suite output · dae46da7
      Joachim Breitner authored
      after changes in 92587bfe.
      
      This problem was noticed on ghcspeed (although only by accident,
      unfortunately, as a change from 0 to 1 is not reported in the summary).
      dae46da7
    • Simon Peyton Jones's avatar
      Refactor FFI error messages · 92587bfe
      Simon Peyton Jones authored
      This patch was provoked by Trac #5610, which I finally got a moment to look at.
      
      In the end I added a new data type ErrUtils.Validity,
      
        data Validity
          = IsValid            -- Everything is fine
          | NotValid MsgDoc    -- A problem, and some indication of why
      
      with some suitable combinators, and used it where appropriate (which touches
      quite a few modules).  The main payoff is that error messages improve for
      FFI type validation.
      92587bfe
    • Simon Peyton Jones's avatar
      Check for boxed tau types in the LHS of type family instances · a997f2df
      Simon Peyton Jones authored
      Fixes Trac #9357
      a997f2df
  10. 24 Jul, 2014 2 commits
  11. 23 Jul, 2014 1 commit
  12. 22 Jul, 2014 1 commit
    • Joachim Breitner's avatar
      Make last a good consumer · b709f0a0
      Joachim Breitner authored
      Summary:
      Make last a good consumer simply by implementing it as foldl. This fixes Trac: #9339.
      Thanks to David Feuer for bringing it up.
      
      Test Plan: perf/should_run/T9339 + general validation
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: phaskell, simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D86
      
      Trac Issues: #9339
      b709f0a0
  13. 21 Jul, 2014 1 commit
    • Edward Z. Yang's avatar
      [ghc-pkg] Fix #5442 by using the flag db stack to modify packages. · d7c807f7
      Edward Z. Yang authored
      
      
      Summary:
      Previously, the full database stack was used for ghc-pkg to
      modify packages, which meant that commands like
      'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'.
      Since package modification is a "read and write" operation, we
      should use the flag db stack (which is currently used for reads)
      to determine which database to update.
      
      There is also a new flag --user-package-db, which lets you explicitly
      set the user database (as seen by --user).  This was mostly added
      to aid in testing, but could be useful for end users as well.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonmar, hvr, austin
      
      Subscribers: simonmar, relrod, carter
      
      Differential Revision: https://phabricator.haskell.org/D84
      d7c807f7
  14. 18 Jul, 2014 1 commit
    • Simon Peyton Jones's avatar
      Further improvements to floating equalities · 4b3df0bb
      Simon Peyton Jones authored
      This equality-floating stuff is horribly delicate!  Trac #9316 showed
      up yet another corner case.
      
      The main changes are
       * include CTyVarEqs when "growing" the skolem set
       * do not include the kind argument to (~) when growing the skolem set
      
      I added a lot more comments as well
      4b3df0bb
  15. 17 Jul, 2014 5 commits
  16. 15 Jul, 2014 1 commit
    • Simon Peyton Jones's avatar
      Entirely re-jig the handling of default type-family instances (fixes Trac #9063) · 9b8ba629
      Simon Peyton Jones authored
      In looking at Trac #9063 I decided to re-design the default
      instances for associated type synonyms.  Previously it was all
      jolly complicated, to support generality that no one wanted, and
      was arguably undesirable.
      
      Specifically
      
      * The default instance for an associated type can have only
        type variables on the LHS.  (Not type patterns.)
      
      * There can be at most one default instances declaration for
        each associated type.
      
      To achieve this I had to do a surprisingly large amount of refactoring
      of HsSyn, specifically to parameterise HsDecls.TyFamEqn over the type
      of the LHS patterns.
      
      That change in HsDecls has a (trivial) knock-on effect in Haddock, so
      this commit does a submodule update too.
      
      The net result is good though.  The code is simpler; the language
      specification is simpler.  Happy days.
      
      Trac #9263 and #9264 are thereby fixed as well.
      9b8ba629