1. 02 Dec, 2016 2 commits
  2. 29 Nov, 2016 1 commit
  3. 20 Nov, 2016 1 commit
    • Ben Gamari's avatar
      Merge cpe_ExprIsTrivial and exprIsTrivial · 58d9f9b7
      Ben Gamari authored
      Strangely my previous attempts at resolving this all seemed to end in
      perplexing segmentation faults in the GHC testsuite (including some
      rather recent attempts). Somehow this attempt miraculously works.
      
      However, there was one wrinkle that I still need to work out fully: we
      need to consider Lits as non-trivial in cpeArg. Failure to do this means
      that we would transform something like,
      
          $trModule = TrModule "HelloWorld"#
      
      into
      
          $trModule = case "HelloWorld"# of x { __DEFAULT -> TrModule x }
      
      Which then fails the consistentStgInfo check in CoreToStg for reasons
      that I am still trying to work out.
      
      Mark T12757 as fixed
      
      Reviewers: simonmar, simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2666
      
      GHC Trac Issues: #11158
      
      (cherry picked from commit 967dd5c9)
      58d9f9b7
  4. 19 Nov, 2016 1 commit
  5. 18 Nov, 2016 2 commits
  6. 17 Nov, 2016 2 commits
    • Edward Z. Yang's avatar
      Remove fancy shadowing logic; always override in package database order. · b5b9cf3a
      Edward Z. Yang authored
      
      
      This is a stopgap fix for GHC 8.0 bug #12485: in particular,
      it relaxes need for -package-db flags to be given in
      dependency order.  The trade-off is that we are a lot more
      unsafe when there are packages with duplicate 'id's in
      the database stack: the new code will not do an ABI compatibility
      check: if two packages have the same 'id', they are assumed to
      be ABI compatible.  If this is not true, GHC may build
      segfaulting executables.
      
      Missing test updates, but I'm putting it up so people can
      take a look.
      
      In GHC 8.2, we'll record ABIs for all dependencies, allowing
      GHC to make better decisions about shadowing.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: austin, niteria, bgamari, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2613
      
      GHC Trac Issues: #12485
      b5b9cf3a
    • Facundo Domínguez's avatar
      Have reify work for local variables with functional dependencies. · e7c12cda
      Facundo Domínguez authored
      It turned out that finalizers were run too early and information
      resulting from simplifying constraints was not available.
      
      This patch runs finalizers after a first call to simplifyTop, and
      then calls simplifyTop a second time to deal with constraints
      that could result from running the finalizers.
      
      Fixes T12777
      
      Test Plan: ./validate
      
      Reviewers: goldfire, simonpj, bgamari, austin
      
      Reviewed By: simonpj
      
      Subscribers: mpickering, mboes, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2659
      
      GHC Trac Issues: #12777
      
      (cherry picked from commit 231a3ae1)
      e7c12cda
  7. 16 Nov, 2016 1 commit
  8. 15 Nov, 2016 1 commit
  9. 14 Nov, 2016 9 commits
  10. 11 Nov, 2016 6 commits
    • Ben Gamari's avatar
      ghc-pkg: Munge dynamic library directories · e7017ca8
      Ben Gamari authored
      Otherwise we end up looking in the wrong place for dynamic libraries on
      Windows. This addresses a regression introduced by D2611. See #12479.
      
      Test Plan: validate across platforms
      
      Reviewers: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2640
      
      GHC Trac Issues: #12479
      
      (cherry picked from commit 75e69edb498511cf2b28dec4e14e6d11232f3e32)
      e7017ca8
    • David Feuer's avatar
      Read parentheses better · cca8ceec
      David Feuer authored
      Instead of pulling a token and looking for `'('` or `')'`,
      just look for the character itself. This prevents us from
      lexing every single item twice, once to see if it's a
      left parenthesis and once to actually parse it.
      
      Partially fixes #12665
      
      Test Plan: Validate
      
      Reviewers: austin, bgamari, hvr
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2623
      
      GHC Trac Issues: #12665
      cca8ceec
    • Ben Gamari's avatar
      testsuite: Fix framework failure in T12771 · 6060964c
      Ben Gamari authored
      Extraneous extra_files
      6060964c
    • Ben Gamari's avatar
      testsuite: Accept T12227 allocations · d5518f72
      Ben Gamari authored
      Sadly I was not able to track down the source of this but there is
      really no more time. Looks like we'll just need to accept it.
      d5518f72
    • Ben Gamari's avatar
      Pass -no-pie to GCC · fefe02c0
      Ben Gamari authored
      Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
      default in their GCC packaging. This breaks our abuse of GCC as a linker
      which requires that we pass -Wl,-r, which is incompatible with
      PIE (since the former implies that we are generating a relocatable
      object file and the latter an executable).
      
      This is a second attempt at D2691. This attempt constrasts with D2691 in that
      it preserves the "does gcc support -no-pie" flag in settings, allowing this to
      be reconfigured by `configure` during installation of a binary distribution.
      Thanks for @rwbarton for drawing attention to this issue.
      
      Test Plan: Validate
      
      Reviewers: austin, hvr, erikd
      
      Reviewed By: erikd
      
      Subscribers: thomie, rwbarton, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2693
      
      GHC Trac Issues: #12759
      fefe02c0
    • Ben Gamari's avatar
      Revert "Pass --no-pie to GCC" · 3da461d9
      Ben Gamari authored
      This reverts commit 60c299a2. We really
      want to be able to change this in the binary distribution `configure`
      script. Trying again in D2693.
      3da461d9
  11. 10 Nov, 2016 1 commit
    • Ben Gamari's avatar
      Pass --no-pie to GCC · 60c299a2
      Ben Gamari authored
      Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
      default in their GCC packaging. This breaks our abuse of GCC as a linker
      which requires that we pass -Wl,-r, which is incompatible with
      PIE (since the former implies that we are generating a relocatable
      object file and the latter an executable).
      60c299a2
  12. 07 Nov, 2016 13 commits
    • Ryan Scott's avatar
      Add test for #12788 · b72b7c8a
      Ryan Scott authored
      Commit bce99086 (#12584) fixed #12788. Let's
      add a test to make sure it stays fixed.
      
      (cherry picked from commit ec22bacd)
      b72b7c8a
    • Ben Gamari's avatar
      configure: Pass HC_OPTS_STAGEx to build system · 891ffe90
      Ben Gamari authored
      Test Plan: Try `./configure HC_OPTS_STAGE0=-foobar` and watch it fail
      
      Reviewers: austin, hvr
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2674
      
      (cherry picked from commit c8e79c037097a4ccb40fa8241ca904d90ea84cce)
      891ffe90
    • Ben Gamari's avatar
      build system: Include CONF_LD_LINKER_OPTS in ALL_LD_OPTS · 7bd5dd09
      Ben Gamari authored
      This ensures that artifacts built with build-prog see these options.
      Also spruce up comments.
      
      Test Plan: Carefully read it.
      
      Reviewers: austin, hvr, erikd
      
      Reviewed By: erikd
      
      Subscribers: thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D2673
      
      (cherry picked from commit e2a9b529a8b06e2dace8c2b4c58710cf5e57ef03)
      7bd5dd09
    • Ben Gamari's avatar
      ghc-cabal: Use correct name of linker flags env variable · 3a0532a8
      Ben Gamari authored
      Currently passing the `CONF_LD_LINKER_OPTS_STAGE0` environment
      variable to `configure` is broken due to this naming inconsistency.
      
      Test Plan: Try passing `CONF_LD_LINKER_OPTS_STAGE0` to `configure`.
      Look at resulting stage0 ghc invocation.
      
      Reviewers: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2672
      
      (cherry picked from commit 97505ad7b23f5e43e1e1a69c159c2c7054f600e7)
      3a0532a8
    • Tamar Christina's avatar
      Align GHCi's library search order more closely with LDs · 95b6affc
      Tamar Christina authored
      Summary:
      Given a static library and an import library in the same folder. e.g.
      
      ```
      libfoo.a
      libfoo.dll.a
      ```
      
      running `ghci -lfoo` we should prefer the import library `libfoo.dll.a`
      over `libfoo.a` because we prefer having to just load the DLL.
      And not having to do any linking.
      
      This also more closely emulated the behaviour of LD, which has a search order of
      
      ```
      libxxx.dll.a
      xxx.dll.a
      libxxx.a
      cygxxx.dll (*)
      libxxx.dll
      xxx.dll
      ```
      
      Test Plan: ./validate
      
      Reviewers: RyanGlScott, austin, hvr, bgamari, erikd, simonmar
      
      Reviewed By: RyanGlScott
      
      Subscribers: thomie, #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D2651
      
      GHC Trac Issues: #12771
      
      (cherry picked from commit 795be0ea)
      95b6affc
    • Ryan Scott's avatar
      Describe symptoms of (and the cure for) #12768 in 8.0.2 release notes · 411bd2df
      Ryan Scott authored
      GHC 8.0.2 introduced a bugfix involving GeneralizedNewtypeDeriving in
      96d45145. This made typechecking of
      GND-produced code a bit stricter, and an unfortunate side effect of this was
      that there were a couple of corner-case programs that stopped compiling
      when transitioning from GHC 8.0.1 to 8.0.2.
      
      Since the number of affected programs seems quite small, and since the fix
      is so straightforward, we opt to simply note this discrepancy in the 8.0.2
      release notes.
      
      Resolves #12768.
      
      (cherry picked from commit ead83db8)
      411bd2df
    • Simon Peyton Jones's avatar
      Fundeps work even for unary type classes · 8719d871
      Simon Peyton Jones authored
      The functional-dependency improvement functions,
         improveFromAnother
         improveFromInstEnv
      had a side-condition that said the type class has to have at
      least two arguments.  But not so, as Trac #12763 shows:
      
         class C a | -> a where ...
      
      is perfectly legal, albeit a bit of a corner case.
      
      (cherry picked from commit 801c2637)
      8719d871
    • Ryan Scott's avatar
      Update 8.0.2 release notes for #12784 · 2591a4b9
      Ryan Scott authored
      Summary:
      The fix for #12220 exposed some ill-typed programs which passed the typechecker
      in GHC 8.0.1 but now fail to typecheck in GHC 8.0.2. It's a bit difficult to
      characterize what exactly triggers this bug, but we at least have a minimal
      example and a simple fix to illustrate the problem and solution, so let's
      add that the the 8.0.2 release notes to advertise this change.
      
      Resolves #12784.
      
      Reviewers: rwbarton, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2682
      
      GHC Trac Issues: #12784
      
      (cherry picked from commit 2e8463b2)
      2591a4b9
    • Simon Peyton Jones's avatar
      Fix Trac #12797: approximateWC · 28c62bb5
      Simon Peyton Jones authored
      This patch makes approximateWC a bit more gung-ho when called
      from the defaulting code.  See Note [ApproximateWC], item (1).
      
      (cherry picked from commit 13508bad)
      28c62bb5
    • Ryan Scott's avatar
      Add test for #12732 · 4227f3ea
      Ryan Scott authored
      (cherry picked from commit 60343a41)
      4227f3ea
    • Simon Peyton Jones's avatar
      Fix the in-scope set for extendTvSubstWithClone · cc3a9504
      Simon Peyton Jones authored
      We'd forgotten the variables free in the kind.
      
      Ditto extendCvSubstWithClone
      
      (cherry picked from commit 15fc5281)
      cc3a9504
    • Matthew Pickering's avatar
      Refine ASSERT in buildPatSyn for the nullary case. · c33aad1e
      Matthew Pickering authored
      For a nullary pattern synonym we add an extra void argument to the
      matcher in order to preserve laziness. The check in buildPatSyn
      wasn't aware of this special case which was causing the assertion to
      fail.
      
      Reviewers: austin, simonpj, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2624
      
      GHC Trac Issues: #12746
      
      (cherry picked from commit 23143f60)
      c33aad1e
    • Simon Marlow's avatar
      Omit unnecessary linker flags · 5c91d076
      Simon Marlow authored
      This omits -L and -l flags from the linker command line that shouldn't
      be necessary because GHC will already add them via the -package-id
      flags we pass.
      
      This also reverts part of 90538d86
      that rearranges the linker command line and causes some knock-on
      problems (see D2618).
      
      Test Plan: validate (need to validate on Windows too)
      
      Reviewers: Phyx, bgamari, niteria, austin, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2639
      
      GHC Trac Issues: #12738
      
      (cherry picked from commit a977c965)
      5c91d076