1. 04 Jun, 2015 8 commits
  2. 03 Jun, 2015 4 commits
  3. 02 Jun, 2015 14 commits
  4. 01 Jun, 2015 14 commits
    • Simon Peyton Jones's avatar
      Set 32-bit perf figure · dbcdfe23
      Simon Peyton Jones authored
    • Simon Peyton Jones's avatar
      Improve constraint tuples (Trac #10451) · b095c97d
      Simon Peyton Jones authored
      * Increase max constraint tuple size to 16
      * Produce a civilised error message if the max
        size is exceeded
    • Simon Peyton Jones's avatar
      Re-do superclass solving (again); fixes #10423 · 1189196c
      Simon Peyton Jones authored
      TcInstDcls.tcSuperClasses was getting increasingly baroque as a
      succession of tickets (#10423 being the latest) pointed out that
      my cunning plan was not so cunning.
      The big issue is how to restrict the evidence that we generate
      for superclass constraints in an instance declaration to avoid
      superclass loops.  See Note [Recursive superclasses] in TcInstDcls
      which explains the plan.
      The question is how to implement the plan.  The new implementation is
      much neater, and is described in Note [Solving superclass constraints]
      in TcInstDcls.
    • Simon Peyton Jones's avatar
      Mark sigof02 tests as expect_broken · 90fde522
      Simon Peyton Jones authored
      Consequence of the GlobalRdrEnv refactoring;
      see Trac #10472
    • Simon Peyton Jones's avatar
      Refactor the GlobalRdrEnv, fixing #7672 · 9b73cb16
      Simon Peyton Jones authored
      This patch started innocently enough, by deleting a single
      call from rnImportDecl, namely
          let gbl_env = mkGlobalRdrEnv (filterOut from_this_mod gres)
      The 'filterOut' makes no sense, and was the cause of #7672.
      But that little loose end led to into a twisty maze of little
      passages, all alike, which has taken me an unreasonably long
      time to straighten out. Happily, I think the result is really
      much better.
      In particular:
       * INVARIANT 1 of the GlobalRdrEnv type was simply not true:
         we had multiple GlobalRdrElts in a list with the same
         gre_name field. This kludgily implmented one form of
       * Meanwhile, extendGlobalRdrEnvRn implemented a second form of
         shadowing, by deleting stuff from the GlobalRdrEnv.
       * In turn, much of this shadowing stuff depended on the Names of
         the Ids bound in the GHCi InteractiveContext being Internal
         names, even though the TyCons and suchlike all had External
         Names. Very confusing.
      So I have made the following changes
       * I re-established INVARIANT 1 of GlobalRdrEnv.  As a result
         some strange code in RdrName.pickGREs goes away.
       * RnNames.extendGlobalRdrEnvRn now makes one call to deal with
         shadowing, where necessary, and another to extend the
         environment.  It deals separately with duplicate bindings.
         The very complicated RdrName.extendGlobalRdrEnv becomes much
         simpler; we need to export the shadowing function, now called
         RdrName.shadowNames; and we can nuke
         RdrName.findLocalDupsRdrEnv altogether.
         RdrName Note [GlobalRdrEnv shadowing] summarises the shadowing
       * The Names of the Ids bound in the GHCi interactive context are
         now all External.  See Note [Interactively-bound Ids in GHCi]
         in HscTypes.
       * Names for Ids created by the debugger are now made by
         IfaceEnv.newInteractiveBinder.  This fixes a lurking bug which
         was that the debugger was using mkNewUniqueSupply 'I' to make
         uniques, which does NOT guarantee a fresh supply of uniques on
         successive calls.
       * Note [Template Haskell ambiguity] in RnEnv shows that one TH-related
         error is reported lazily (on occurrences) when it might be better
         reported when extending the environment.  In some (but not all) cases
         this was done before; but now it's uniformly at occurrences.  In
         some ways it'd be better to report when extending the environment,
         but it's a tiresome test and the error is rare, so I'm leaving it
         at the lookup site for now, with the above Note.
       * A small thing: RnNames.greAvail becomes RdrName.availFromGRE, where
         it joins the dual RdrName.gresFromAvail.
    • Simon Peyton Jones's avatar
      Treat pattern-synonym binders more consistently · 11d8f84f
      Simon Peyton Jones authored
      Pattern-synonyms are in value declarations, but were being
      bound by getLocalNonValBinders.  This seemed odd, and indeed
      staightening it out allowed me to remove a field from
      The main changes are in RnSource.rnSrcDecls.
    • Simon Peyton Jones's avatar
      White space only · 2f0011ac
      Simon Peyton Jones authored
    • Herbert Valerio Riedel's avatar
      Re-center perf numbers for T5631 · 34dcf8a0
      Herbert Valerio Riedel authored
      7dd0ea74 seems to have tipped this one over,
      although 7dd0ea74 itself had only a minimal impact on my local system.
      Locally, I measured right before 7dd0ea74:
        Expected    T5631(normal) bytes allocated: 776121120 +/-5%
        Actual      T5631(normal) bytes allocated: 811973144
        Deviation   T5631(normal) bytes allocated:       4.6 %
      and at 7dd0ea74:
        Expected    T5631(normal) bytes allocated: 776121120 +/-5%
        Actual      T5631(normal) bytes allocated: 812288344
        Deviation   T5631(normal) bytes allocated:       4.7 %
      Reviewed By: austin
      Differential Revision: https://phabricator.haskell.org/D936
    • Simon Marlow's avatar
      Don't call DEAD_WEAK finalizer again on shutdown (#7170) · dfdc50d6
      Simon Marlow authored
      There's a race condition like this:
        # A foreign pointer gets promoted to the last generation
        # It has its finalizer called manually
        # We start shutting down the runtime in `hs_exit_` from the main
        # A minor GC starts running (`scheduleDoGC`) on one of the threads
        # The minor GC notices that we're in `SCHED_INTERRUPTING` state and
          advances to `SCHED_SHUTTING_DOWN`
        # The main thread tries to do major GC (with `scheduleDoGC`), but it
          exits early because we're in `SCHED_SHUTTING_DOWN` state
        # We end up with a `DEAD_WEAK` left on the list of weak pointers of
          the last generation, because it relied on major GC removing it from
          that list
      This change:
        * Ignores DEAD_WEAK finalizers when shutting down
        * Makes the major GC on shutdown more likely
        * Fixes a bogus assert
      Test Plan:
      before this diff https://ghc.haskell.org/trac/ghc/ticket/7170#comment:5
      reproduced and after it doesn't
      Reviewers: ezyang, austin, simonmar
      Reviewed By: simonmar
      Subscribers: bgamari, thomie
      Differential Revision: https://phabricator.haskell.org/D921
      GHC Trac Issues: #7170
    • Edward Z. Yang's avatar
      Newline after type of allocate(). · f82e8665
      Edward Z. Yang authored
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
    • Edward Z. Yang's avatar
      Add (failing) test case for #7672. · a27fb46f
      Edward Z. Yang authored
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
    • Edward Z. Yang's avatar
      Typofix: missing period. (#10460) · e5be846b
      Edward Z. Yang authored
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
    • Edward Z. Yang's avatar
    • Edward Z. Yang's avatar
      Replace tabs with spaces. · 931268a2
      Edward Z. Yang authored
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>