1. 13 Dec, 2016 1 commit
  2. 02 Dec, 2016 2 commits
    • Alexander Vershilov's avatar
      Install toplevel handler inside fork. · fb0f4cf6
      Alexander Vershilov authored
      When rts is forked it doesn't update toplevel handler, so UserInterrupt
      exception is sent to Thread1 that doesn't exist in forked process.
      
      We install toplevel handler when fork so signal will be delivered to the
      new main thread.
      
      Fixes #12903
      
      Reviewers: simonmar, austin, erikd, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2770
      
      GHC Trac Issues: #12903
      
      (cherry picked from commit 895a131f)
      fb0f4cf6
    • Simon Peyton Jones's avatar
      Fix inference of partial signatures · 4212674b
      Simon Peyton Jones authored
      When we had
        f :: ( _ ) => blah
      we were failing to call growThetaTyVars, as we do in the
      no-type-signature case, and that meant that we weren't generalising
      over the right type variables.  I'm quite surprised this didn't cause
      problems earlier.
      
      Anyway Trac #12844 showed it up and this patch fixes it
      
      (cherry picked from commit 1bfff60f)
      4212674b
  3. 19 Nov, 2016 1 commit
  4. 18 Nov, 2016 1 commit
  5. 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
  6. 16 Nov, 2016 1 commit
  7. 15 Nov, 2016 1 commit
  8. 11 Nov, 2016 3 commits
  9. 07 Nov, 2016 6 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
    • 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
    • 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
    • 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
    • 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
  10. 04 Nov, 2016 1 commit
    • Simon Marlow's avatar
      Fix failure in setnumcapabilities001 (#12728) · 2722cd55
      Simon Marlow authored
      The value of enabled_capabilities can change across a call to
      requestSync(), and we were erroneously using an old value, causing
      things to go wrong later.  It manifested as an assertion failure, I'm
      not sure whether there are worse consequences or not, but we should
      get this fix into 8.0.2 anyway.
      
      The failure didn't happen for me because it only shows up on machines
      with fewer than 4 processors, due to the new logic to enable -qn
      automatically.  I've bumped the test parameter 8 to make it more
      likely to exercise that code.
      
      Test Plan: Ran setnumcapabilities001 many times
      
      Reviewers: niteria, austin, erikd, rwbarton, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2617
      
      GHC Trac Issues: #12728
      
      (cherry picked from commit acc98510)
      2722cd55
  11. 22 Oct, 2016 1 commit
    • Simon Peyton Jones's avatar
      Test for newtype with unboxed argument · 4c8aab8f
      Simon Peyton Jones authored
      Newtypes cannot (currently) have an unboxed argument type.
      But Trac #12729 showed that this was only being checked for
      newtypes in H98 syntax; in GADT snytax they were let through.
      
      This patch moves the test to checkValidDataCon, where it properly
      belongs.
      
      (cherry picked from commit 1f09c16c)
      4c8aab8f
  12. 18 Oct, 2016 6 commits
  13. 14 Oct, 2016 4 commits
  14. 13 Oct, 2016 3 commits
    • Ryan Scott's avatar
      Add test for #12456 · 243994c3
      Ryan Scott authored
      Commit f352e5cd fixed #12456. Let's add a test
      to make sure it stays fixed.
      
      (cherry picked from commit fef1df4b)
      243994c3
    • Ben Gamari's avatar
      59741e4f
    • Simon Peyton Jones's avatar
      Fix impredicativity (again) · c93ad554
      Simon Peyton Jones authored
      This patch fixes Trac #12616.
      
      Dignosis.  In TcUnify.tc_sub_type_ds we were going to some trouble to
      support co- and contra-variance even for impredicative types.  With
      -XImpredicativeTYpes, this allowed a unification variable to be
      unified with a polytype (probably wrongly) and that caused later
      trouble in the constraint solver, where -XImpredicativeTypes was /not/
      on.  In effect, -XImpredicativeTypes can't be switched on locally.
      
      Why did we want ImpredicativeTypes locally?  Because the program
      generated by GND for a higher-rank method involved impredicative
      instantation of 'coerce':
            op = coerce op   -- where op has a higher rank type
      See Note [Newtype-deriving instances] in TcGenDeriv.
      
      Cure.
      
      1.  It is ghastly to rely on ImpredicativeTypes (a 100% flaky
          feature) to instantiate coerce polymorphically.  Happily we
          now have Visible Type Application, so I've used that instead
          which should be solid and reliable.
      
      2.  I deleted the code in tc_sub_type_ds that allows the constraint
          solver to "look through" a unification variable to find a
          polytype.  That used to be essential in the days of ReturnTv,
          but it's utterly unreliable and should be consigned to the dustbin
          of history.  (We have ExpType now for the essential uses.)
      
      Tests involving ImpredicativeTypes are affected, but I'm not worried
      about them... it's advertised as a feature you can't rely on, and
      I want to reform it outright.
      
      (cherry picked from commit b612da66)
      c93ad554
  15. 12 Oct, 2016 1 commit
    • Ben Gamari's avatar
      RnExpr: Actually fail if patterns found in expression · 47ae01bf
      Ben Gamari authored
      This fixes #12584, where wildcard patterns were snuck into an
      expression, which then crashed the typechecker in TcExpr since EWildPats
      aren't supposed to appear in the AST after renaming.
      
      The problem was that `rnTopSpliceDecl` failed to check for errors from
      `rnSplice` (as done by other callers to `rnSplice`).
      
      Thanks to Shayan for reporting this!
      
      Reviewers: simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2539
      
      GHC Trac Issues: #12584
      
      (cherry picked from commit bce99086)
      47ae01bf
  16. 10 Oct, 2016 6 commits
    • Ben Gamari's avatar
      Fix test output · f168a616
      Ben Gamari authored
      f168a616
    • Facundo Domínguez's avatar
      Don't ignore addTopDecls in module finalizers. · a77bbb8b
      Facundo Domínguez authored
      Summary:
      Module finalizer could call addTopDecls, however, the declarations
      added in this fashion were ignored. This patch makes sure to rename,
      type check and incorporate this declarations.
      
      Because a declaration may include a splice which calls addModFinalizer,
      the list of finalizers is repeteadly checked after adding declarations
      until no more finalizers remain.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, goldfire, simonpj, austin
      
      Reviewed By: bgamari, simonpj
      
      Subscribers: simonmar, mboes, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2505
      
      GHC Trac Issues: #12559
      
      (cherry picked from commit 71dd6e44)
      a77bbb8b
    • Matthew Pickering's avatar
      Add missing test from D2545 · 7643c149
      Matthew Pickering authored
      This was somehow dropped from the original merge.
      
      Differential Revision: https://phabricator.haskell.org/D2545
      
      GHC Trac Issues: #12615
      
      (cherry picked from commit 1851349a)
      7643c149
    • Simon Peyton Jones's avatar
      More tests for Trac #12522 · 801cbb42
      Simon Peyton Jones authored
      These ones test the variations in coment:15 of the ticket
      
      (cherry picked from commit a6111b8c)
      801cbb42
    • Simon Peyton Jones's avatar
      Orient improvement constraints better · 12cfcbeb
      Simon Peyton Jones authored
      This patch fixes an infinite loop in the constraint solver,
      shown up by Trac #12522.
      
      The solution is /very/ simple: just reverse the orientation of the
      derived constraints arising from improvement using type-family
      injectivity.  I'm not very proud of the fix --- it seems fragile
      --- but it has the very great merit of simplicity, and it works
      fine.
      
      See Note [Improvement orientation] in TcInteract, and some
      discussion on the Trac ticket.
      
      (cherry picked from commit b255ae7b)
      12cfcbeb
    • Simon Peyton Jones's avatar
      Improve error handling in TcRnMonad · 5662ceae
      Simon Peyton Jones authored
      See Note [Constraints and errors] in TcRnMonad.  This
      patch fixes Trac #12124 in quite a neat way.
      
      (cherry picked from commit 465c6c5d)
      5662ceae