Skip to content
Snippets Groups Projects
  1. May 29, 2018
  2. May 28, 2018
    • Tamar Christina's avatar
      Clean up Windows testsuite failures · 60fb2b21
      Tamar Christina authored
      Summary:
      Another round and attempt at getting these down to 0.
      
      We really should re-enable the CI and not wait for those cloud based ones.
      
      I've disabled the backpack tests on windows as they are too broad, they test
      as much the shell as they do the compiler.
      
      The perf tests have been too long to track down. but the numbers are horrible
      but I don't see them getting fixed so just have to accept them.
      
      T9293 has new windows specific output because a Dyn way only flag was added.
      This will of course not work on non-Dyn way builds.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, hvr, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15107
      
      Differential Revision: https://phabricator.haskell.org/D4668
      60fb2b21
    • Tamar Christina's avatar
      Fix 32 bit windows build · 4778cba1
      Tamar Christina authored
      Summary:
      Fix a number of issues that have broken the 32 bit build.
      This makes it build again.
      
      Test Plan: ./validate
      
      Reviewers: hvr, goldfire, bgamari, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4691
      4778cba1
    • Ömer Sinan Ağacan's avatar
      Update GHC.Stats docs · a5446c45
      Ömer Sinan Ağacan authored
      Make it clear that max_live_bytes is updated after a major GC whereas
      live_bytes is updated after all GCs (including minor collections) and
      considers data in uncollected generations as live.
      
      Reviewers: bgamari, simonmar, hvr
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4734
      a5446c45
  3. May 27, 2018
  4. May 26, 2018
  5. May 25, 2018
    • Simon Peyton Jones's avatar
      40d5b9e9
    • Simon Marlow's avatar
      isDllName: use Opt_ExternalDynamicRefs, not WayDyn · c618732e
      Simon Marlow authored
      This should have been part of D4477, but got missed.
      c618732e
    • Simon Marlow's avatar
      Add -fghci-leak-check to check for space leaks · 5b6ef59f
      Simon Marlow authored
      Summary:
      (re-applying this patch now that D4659 is committed)
      
      Space leaks in GHCi emerge from time to time and tend to come back again
      after they get fixed. This is an attempt to limit regressions by
      
      * adding a reliable detection for some classes of space leaks in GHCi
      * turning on leak checking for all GHCi tests in the test suite, so that
        we'll notice if the leak appears again.
      
      The idea for detecting space leaks is quite simple:
      
      * find some data that we expect to be GC'd later, make a weak pointer to it
      * when we expect the data to be dead, do a `performGC` and then check
        the status of the weak pointer.
      
      It would be nice to apply this trick to lots of things in GHC,
      e.g. ensuring that HsSyn is not retained after the desugarer, or
      ensuring that CoreSyn from the previous simplifier pass is not retained.
      
      Test Plan: validate
      
      Reviewers: bgamari, simonpj, erikd, niteria
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #15111
      5b6ef59f
  6. May 24, 2018
    • Ryan Scott's avatar
      Minor typos · 5ca623a5
      Ryan Scott authored
      5ca623a5
    • Ryan Scott's avatar
      Clean up the conflicting data family instances error message · 979f085c
      Ryan Scott authored
      Summary:
      The way we were pretty-printing conflicting data family
      instances in an error message was far from ideal:
      
      1. If a data type had no constructors, it would print an equals sign
         with nothing to the right of it.
      2. It would try to print GADTs using Haskell98 syntax.
      3. It eta-reduced away some type variables from the LHS.
      
      This patch addresses these three issues:
      
      1. We no longer print constructors at all in this error message.
         There's really no reason to do so in the first place, since
         duplicate data family instances always conflict, regardless of
         their constructors.
      2. Since we no longer print constructors, we no longer have to
         worry about whether we're using GADT or Haskell98 syntax.
      3. I've put in a fix to ensure that type variables are no longer
         eta-reduced away from the LHS.
      
      Test Plan: make test TEST=T14179
      
      Reviewers: goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14179
      
      Differential Revision: https://phabricator.haskell.org/D4711
      979f085c
    • Ryan Scott's avatar
      Check for mismatched class methods during typechecking · 1879d9d2
      Ryan Scott authored
      Summary:
      Template Haskell provides a wormhole through which you can
      sneak methods that don't belong to a class into an instance for that
      class, bypassing the renamer's validity checks. The solution adopted
      here is to mirror the treatment for associated type family instances,
      which have an additional check in the typechecker which catch
      mismatched associated type families that were snuck through using
      Template Haskell. I've put a similar check for class methods into
      `tcMethods`.
      
      Test Plan: make test TEST=T12387
      
      Reviewers: bgamari, simonpj
      
      Reviewed By: bgamari, simonpj
      
      Subscribers: simonpj, rwbarton, thomie, carter
      
      GHC Trac Issues: #12387
      
      Differential Revision: https://phabricator.haskell.org/D4710
      1879d9d2
    • Ben Gamari's avatar
      testsuite: Bump OS X performance numbers · 49691c4f
      Ben Gamari authored
      Sadly I can't easily determine the cause of T13701's regression since the tree
      was broken.
      49691c4f
  7. May 23, 2018
    • Ben Gamari's avatar
      Disable the SRT offset optimisation on MachO platforms · bf10456e
      Ben Gamari authored and Ben Gamari's avatar Ben Gamari committed
      Unfortunately, this optimisation is infeasible on MachO platforms (e.g.
      Darwin) due to an object format limitation. Specifically, linking fails
      with errors of the form:
      
           error: unsupported relocation with subtraction expression, symbol
           '_integerzmgmp_GHCziIntegerziType_quotInteger_closure' can not be
           undefined in a subtraction expression
      
      Apparently MachO does not permit relocations' subtraction expressions to
      refer to undefined symbols. As far as I can tell this means that it is
      essentially impossible to express an offset between symbols living in
      different compilation units. This means that we lively can't use this
      optimisation on MachO platforms.
      
      Test Plan: Validate on Darwin
      
      Reviewers: simonmar, erikd
      
      Subscribers: rwbarton, thomie, carter, angerman
      
      GHC Trac Issues: #15169
      
      Differential Revision: https://phabricator.haskell.org/D4715
      bf10456e
    • Simon Marlow's avatar
      Fix a bug in SRT generation · d424d4a4
      Simon Marlow authored
      Summary:
      I had good intentions, but they were not being followed. In particular,
      this comment:
      
      ```
      ---  - we never resolve a reference to a CAF to the contents of its SRT, since
      ---    the point of SRTs is to keep CAFs alive.
      ```
      
      was not true, because we updated the srtMap after generating the SRT
      for a CAF. Therefore it was possible for another CAF to refer to an
      earlier CAF, and the reference to the earlier CAF would be shortcutted
      to refer to its SRT instead of pointing to the CAF itself.
      
      The fix is just to not update the srtMap when generating the SRT for a
      CAF, but I also refactored the code and comments around this to be a bit
      better organised.
      
      Test Plan: Harbourmaster
      
      Reviewers: bgamari, michalt, simonpj, erikd
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #15173, #15168
      
      Differential Revision: https://phabricator.haskell.org/D4721
      d424d4a4
    • Simon Peyton Jones's avatar
      Use dischargeFunEq consistently · a32c8f75
      Simon Peyton Jones authored
      Trac #15122 turned out to be interesting.
      
      * Were calling dischargeFmv in three places.
      
      * In all three cases we dealt with the Given case
        separately.
      
      * In two of the three cases the Given code was right,
        (albeit duplicated).
      
      * In the third case (in TcCanonical.canCFunEqCan), we had
           ; case flav of
               Given -> return () -- nothing more to do.
        which was utterly wrong.
      
      The solution is easy: move the Given-case handling into
      dischargeFmv (now reenamed dischargeFunEq), and delete it
      from the call sites.
      
      Result: less code, easier to understand (dischargeFunEq handles
      all three cases, not just two out of three), and Trac #15122 is fixed.
      a32c8f75
    • Simon Peyton Jones's avatar
      Don't expose strictness when sm_inline is False · d191db48
      Simon Peyton Jones authored
      This is very much a corner case, but Trac #15163 showed
      that if you have a RULE like
          forall x. f (g x) = ..x..
      
      and g = undefined, then the simplifier is likely to discard
      that 'x' argument. It is usually right to do so; but not here
      because then x is used on the right but not bound on the left.
      
      The fix is a narrow one, aimed at this rather pathalogical case.
      See Note [Do not expose strictness if sm_inline=False] in
      SimplUtils.
      d191db48
    • Simon Peyton Jones's avatar
      Add missing check to isReflCoVar_maybe · 86bba7d5
      Simon Peyton Jones authored
      isReflCoVar_maybe is called, by CoreLint, on all sorts of
      Vars (tyvars, term vars, coercion vars).  But it was silently
      assuming that it was always called on a CoVar, and as a result
      could crash fatally.  This is the immediate cause of the panic
      in Trac #15163.
      
      It's easy to fix.
      
      NB: this does not completely fix Trac #15163; more to come
      86bba7d5
    • Simon Peyton Jones's avatar
      Remove special case from TcTyVar level check · 49a832dd
      Simon Peyton Jones authored
      In TcMType.writeMetaTyVarRef we have an assertion
      check, level_check_ok, that the type being written
      to a unification variable is not deeper than the level
      of the unification varaible itself.
      
      This check used to have a special case for fmv/fsk
      flatten vars, but this commit changed fmv/fsks to have
      an ordinary level number:
      
          commit 2bbdd00c
          Author: Simon Peyton Jones <simonpj@microsoft.com>
          Date:   Fri May 18 08:43:11 2018 +0100
      
          Orient TyVar/TyVar equalities with deepest on the left
      
      So we can delete the isFlattenTyVar special case from
      the level_check_ok assertion.  Simpler, less ad hoc.
      49a832dd
    • Gabor Greif's avatar
      Typo in comments · 928f606b
      Gabor Greif authored
      928f606b
  8. May 22, 2018
  9. May 21, 2018
    • Simon Peyton Jones's avatar
      Check for type families in an instance context · af0757de
      Simon Peyton Jones authored
      This patch adds a check for type families to the instance-decl
      termination check.  See Note [Type families in instance contexts]
      and Trac #15172.
      af0757de
    • Simon Peyton Jones's avatar
      Make dischargeFmv handle Deriveds · 57858fc8
      Simon Peyton Jones authored
      A Derived CFunEqCan does not "own" its FlatMetaTv (fmv), and should not
      update it.  But one caller (canCFunEqCan) was failing to satisfy the
      precondition to dischargeFmv, which led to a crash (Trac #15170).
      
      I fixed this by making dischargeFmv handle Deriveds (to avoid forcing
      each caller to do so separately).
      
      NB: this does not completely fix the original #15170 bug, but I'll
      explain that on the ticket.  The test case for this patch is actually
      the program in comment:1.
      57858fc8
    • Simon Peyton Jones's avatar
      Remove TcType.toTcType · b7e80ae0
      Simon Peyton Jones authored
      In the olden days we insisted that only TcTyVars could appear
      in a TcType.  But now we are more accommodating; see TcType
        Note [TcTyVars and TyVars in the typechecker]
      
      This patch removes a function that converted a Type to a TcType.
      It didn't do anything useful except statisfy an invariant that
      we no longer have.  Now it's gone.
      b7e80ae0
    • Simon Peyton Jones's avatar
      Fix perf numbers for #15164 · 5f3fb712
      Simon Peyton Jones authored
      5f3fb712
    • Simon Peyton Jones's avatar
      Do better sharing in the short-cut solver · f2ce86c2
      Simon Peyton Jones authored
      Trac #15164 showed that it sometimes really matters to share
      sub-proofs when solving constraints.  Without it, we can get
      exponentialy bad behaviour.
      
      Fortunately, it's easily solved.
      Note [Shortcut try_solve_from_instance] explains.
      
      I did some minor assocaited refactoring.
      f2ce86c2
Loading