1. 21 Aug, 2018 7 commits
    • Ben Gamari's avatar
      Fix redundant imports of Class · 966aa781
      Ben Gamari authored
    • Sergei Trofimovich's avatar
      driver: unconditionally disable relaxation when linking partially · 1cc9061f
      Sergei Trofimovich authored
      In https://github.com/gentoo-haskell/gentoo-haskell/issues/704
      user explicitly uses -Wl,--relax for most built binaries.
      Most of the time this works fine except for capi haskell code
      similar to the following:
      {-# LANGUAGE CApiFFI #-}
      module Z where
      import Foreign.C
      foreign import capi "unistd.h close" c_close :: CInt -> IO CInt
      In this case compilation fails as:
      $ inplace/bin/ghc-stage2 -c Z.hs -optl-Wl,--relax -fforce-recomp
      ld: --relax and -r may not be used together
      GHC's driver already disables relaxation on sparc as there relaxation
      is already a default mode.
      This change disables relaxation on partial linking for all platforms
      where linker is binutils linker.
      Reported-by: wmyrda
      Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/704
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
      Test Plan: pass -optl-Wl,--relax in test above
      Reviewers: bgamari
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4888
    • Simon Peyton Jones's avatar
      Add a solveEqualities to tcClassDecl1 · 43b08cfb
      Simon Peyton Jones authored
      Trac #15505 showed that, when we have a type error, we
      could have an unfilled-in coercion hole.  We don't want an
      assertion error in that case.
      The underlying cause is that tcClassDecl1 should call
      solveEqualities to fully solve all top-level equalities
      (or fail in the attempt).
      I also refactored the ClassDecl case for tcTyClDecl1 into
      a new function tcClassDecl1.  That makes it symmetrical
      with the others.
    • Simon Peyton Jones's avatar
      Comments only · 828e9493
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Improve ambiguous-occurrence error message · 18c302cb
      Simon Peyton Jones authored
      Trac #15487 correctly reported that the qualification
      of a Name in an ambiguous-occurrence error message was
      wrong.  This patch fixes it.
      It's easily done, in RnUtils.addNameClashErrRn
      The problem was that in complaining about M.x we must
      enusre that 'M' part is the same as that used in
    • Simon Peyton Jones's avatar
      Set strictness correctly for JoinIds · ce6ce788
      Simon Peyton Jones authored
      We were failing to keep correct strictness info when eta-expanding
      join points; Trac #15517.   The situation was something like
        \q v eta ->
           let j x = error "blah
               -- STR Lx   bottoming!
           in case y of
                 A -> j x eta
                 B -> blah
                 C -> j x eta
      So we spot j as a join point and eta-expand it.  But we must
      also adjust the stricness info, else it vlaimes to bottom after
      one arg is applied but now it has become two.
      I fixed this in two places:
       - In CoreOpt.joinPointBinding_maybe, adjust strictness info
       - In SimplUtils.tryEtaExpandRhs, return consistent values
         for arity and bottom-ness
    • David Feuer's avatar
      Expose the StableName constructor · 9c4e6c6b
      David Feuer authored
      * Move the definition of `StableName` from `System.Mem.StableName`
        to a new `GHC.StableName` module.
      * Expose the `StableName` data constructor from `GHC.StableName`.
        Once we have `UnliftedArray#`, this will enable `StableName`s to
        be stored in `UnliftedArray`s (from `primitive`) without unsafe
      Reviewers: hvr, bgamari, andrewthad, osa1
      Reviewed By: osa1
      Subscribers: osa1, rwbarton, carter
      GHC Trac Issues: #15535
      Differential Revision: https://phabricator.haskell.org/D5078
  2. 20 Aug, 2018 3 commits
  3. 18 Aug, 2018 1 commit
  4. 17 Aug, 2018 8 commits
  5. 16 Aug, 2018 2 commits
  6. 15 Aug, 2018 3 commits
  7. 14 Aug, 2018 1 commit
    • Ryan Scott's avatar
      Properly designate LambdaCase alts as CaseAlt in TH · 32008a9d
      Ryan Scott authored
      When `\case` expressions are parsed normally, their
      alternatives are marked as `CaseAlt` (which means that they are
      pretty-printed without a `\` character in front of them, unlike for
      lambda expressions). However, `\case` expressions created by way of
      Template Haskell (in `Convert`) inconsistently designated the case
      alternatives as `LambdaExpr`, causing them to be pretty-printed
      poorly (as shown in #15518). The fix is simple: use `CaseAlt`
      Test Plan: make test TEST=T15518
      Reviewers: goldfire, bgamari
      Subscribers: rwbarton, carter
      GHC Trac Issues: #15518
      Differential Revision: https://phabricator.haskell.org/D5069
  8. 13 Aug, 2018 1 commit
  9. 12 Aug, 2018 6 commits
  10. 11 Aug, 2018 2 commits
    • Krzysztof Gogolewski's avatar
      Simplify testsuite driver · f27d7145
      Krzysztof Gogolewski authored
      - remove clean_cmd
      - framework_failures was undefined
      - times_file was not used
      - if_verbose_dump was called only when verbose >= 1; remove the check
      - simplify normalise_whitespace
      Test Plan: validate
      Reviewers: bgamari, thomie
      Reviewed By: thomie
      Subscribers: rwbarton, carter
      Differential Revision: https://phabricator.haskell.org/D5061
    • Christiaan Baaij's avatar
      Filter plugin dylib locations · b324c562
      Christiaan Baaij authored
      Previously we just created a cartesian product of the library
      paths of the plugin package and the libraries of the package.
      Of course, some of these combinations result in a filepath of
      a file doesn't exists, leading to #15475.
      Instead of making `haskFile` return Nothing in case a file
      doesn't exist (which would hide errors), we look at all the
      possible dylib locations and ensure that at least one of those
      locations is an existing file. If the list turns out to be
      empty however, we panic.
      Reviewers: mpickering, bgamari
      Reviewed By: mpickering
      Subscribers: monoidal, rwbarton, carter
      GHC Trac Issues: #15475
      Differential Revision: https://phabricator.haskell.org/D5048
  11. 09 Aug, 2018 6 commits