1. 17 Nov, 2016 1 commit
    • Edward Z. Yang's avatar
      Test for type synonym loops on TyCon. · 31398fbc
      Edward Z. Yang authored
      
      
      Summary:
      Previously, we tested for type synonym loops by doing
      a syntactic test on the literal type synonym declarations.
      However, in some cases, loops could go through hs-boot
      files, leading to an infinite loop (#12042); a similar
      situation can occur when signature merging.
      
      This commit replaces the syntactic test with a test on
      TyCon, simply by walking down all type synonyms until
      we bottom out, or find we've looped back.  It's a lot
      simpler.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, austin, bgamari
      
      Subscribers: goldfire, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2656
      
      GHC Trac Issues: #12042
      31398fbc
  2. 16 Nov, 2016 2 commits
  3. 15 Nov, 2016 2 commits
  4. 14 Nov, 2016 2 commits
    • Ben Gamari's avatar
      testsuite: Fix creep of T4029 · cb168900
      Ben Gamari authored
      Ostensibly due to IfaceType rework, but I have my doubts.
      cb168900
    • Simon Marlow's avatar
      Accept output for scc003 · 034e01e4
      Simon Marlow authored
      Looks like e3f341f3 broke it, but we
      wouldn't have noticed because the test isn't run in validate.
      
      I think the change is OK.  We don't get a tick for x' any more, because
      it is converted directly to a case instead of a let-binding, but we
      still get a tick for the "pattern binding" (!x').  This could be better
      - f.(...) isn't all that intuitive - but it's not strictly wrong.
      034e01e4
  5. 13 Nov, 2016 1 commit
    • Ben Gamari's avatar
      Kill Type pretty-printer · 6c0f10fa
      Ben Gamari authored
      Here we consolidate the pretty-printing logic for types in IfaceType. We
      need IfaceType regardless and the printer for Type can be implemented in
      terms of that for IfaceType. See #11660.
      
      Note that this is very much a work-in-progress. Namely I still have yet
      to ponder how to ease the hs-boot file situation, still need to rip out
      more dead code, need to move some of the special cases for, e.g., `*` to
      the IfaceType printer, and need to get it to validate. That being said,
      it comes close to validating as-is.
      
      Test Plan: Validate
      
      Reviewers: goldfire, austin
      
      Subscribers: goldfire, thomie, simonpj
      
      Differential Revision: https://phabricator.haskell.org/D2528
      
      GHC Trac Issues: #11660
      6c0f10fa
  6. 12 Nov, 2016 2 commits
  7. 10 Nov, 2016 2 commits
    • Ryan Scott's avatar
      Prevent GND from inferring an instance context for method-less classes · 03e8d26f
      Ryan Scott authored
      When `GeneralizedNewtypeDeriving` is used with a type class that has no
      methods, it will generate a redundant context, and as a result, it can
      trigger warnings when compiled with `-Wredundant-constraints`. This is a
      simple change in behavior to check beforehand if a class has methods
      when deriving it with GND, and if it has no methods, avoid inferring the
      redundant context.
      
      Beware that the test for #6088, which used to be expected to fail, now
      compiles without issue since it doesn't infer a problematic instance
      context.
      
      Thanks to Simon Peyton Jones for doing the necessary refactoring in
      f05d685a.
      
      Fixes #12814.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, rwbarton, simonpj, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2692
      
      GHC Trac Issues: #12814
      03e8d26f
    • Ben Gamari's avatar
      0a122a4c
  8. 07 Nov, 2016 1 commit
    • Simon Marlow's avatar
      Fix hs_try_putmvar003 (#12800) · 91f9e138
      Simon Marlow authored
      Summary:
      There was a race condition on some shared data when creating the
      callback thread.
      
      I couldn't repro the issue without inserting a dummy usleep(100), but
      it's definitely a bug.
      
      Test Plan: validate
      
      Reviewers: bgamari, austin, erikd
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2678
      
      GHC Trac Issues: #12800
      91f9e138
  9. 06 Nov, 2016 2 commits
  10. 05 Nov, 2016 1 commit
  11. 04 Nov, 2016 1 commit
  12. 03 Nov, 2016 3 commits
  13. 02 Nov, 2016 2 commits
  14. 01 Nov, 2016 1 commit
  15. 31 Oct, 2016 2 commits
    • Tamar Christina's avatar
      Align GHCi's library search order more closely with LDs · 795be0ea
      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
      795be0ea
    • Gabor Greif's avatar
      Typos in comments · 80d4a033
      Gabor Greif authored
      80d4a033
  16. 28 Oct, 2016 2 commits
  17. 27 Oct, 2016 1 commit
  18. 26 Oct, 2016 3 commits
  19. 25 Oct, 2016 1 commit
  20. 24 Oct, 2016 4 commits
    • Simon Peyton Jones's avatar
      Test Trac #12081 · 853cdaea
      Simon Peyton Jones authored
      853cdaea
    • Simon Peyton Jones's avatar
      Test Trac #12174 · 03b0b8e4
      Simon Peyton Jones authored
      03b0b8e4
    • Simon Peyton Jones's avatar
      Take account of kinds in promoteTcType · 08ba691a
      Simon Peyton Jones authored
      One of the ASSERT failures in Trac #12762, namely the one for T4439,
      showed that I had not dealt correctly with promoting the kind of
      a type in promoteTcType.
      
      Happily I could fix this by simplifying InferRes (eliminating the
      ir_kind field), so things get better. And the ASSERT is fixed.
      08ba691a
    • Simon Peyton Jones's avatar
      Prioritise class-level equality costraints · 1c4a39d3
      Simon Peyton Jones authored
      This patch fixes Trac #12734 by prioritising the class-level
      variants of equality constraints, namely (a~b) and (a~~b).
      
      See comment:10 of Trac #12734 for a description of what
      went wrong, and Note [Prioritise class equalities] in TcSMonad.
      
      The fix is still not great, but it's a definite step forward, and
      cures the particular problem.
      
      Worth merging to 8.0.
      1c4a39d3
  21. 22 Oct, 2016 3 commits
    • Erik de Castro Lopo's avatar
      Add -Wcpp-undef warning flag · 3cb32d8b
      Erik de Castro Lopo authored
      When enabled, this new warning flag passes `-Wundef` to the C
      pre-processor which causes the pre-processor to warn on uses of
      the `#if` directive on undefined identifiers.
      
      It is not currently enabled in any of the standard warning groups.
      
      Test Plan: Make sure the two tests pass on all major platforms.
      
      Reviewers: hvr, carter, Phyx, bgamari, austin
      
      Reviewed By: Phyx
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2626
      
      GHC Trac Issues: #12752
      3cb32d8b
    • Matthew Pickering's avatar
      Skip T5611 on OSX as it fails non-deterministically. · a662f46c
      Matthew Pickering authored
      Reviewers: austin, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2622
      
      GHC Trac Issues: #12751
      a662f46c
    • Simon Marlow's avatar
      Fix failure in setnumcapabilities001 (#12728) · acc98510
      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
      acc98510
  22. 21 Oct, 2016 1 commit
    • Simon Peyton Jones's avatar
      Accept 20% dedgradation in Trac #5030 compile time · 1f09b246
      Simon Peyton Jones authored
      In commit
      
        31621b12 * A collection of type-inference refactorings.
      
      I fixed a bug in the on-the-fly unifier.  Usually the
      on-the-fly unifier (TcUnify) defers type function
      applications to the constraint solver.  But in one situation
      it inconsistently did not defer, so a unification happened
      without reducing a type function.  By a fluke this makes
      T5030 (specifcially the definition of cnst) much better.
      
      It turns out that consistently non-deferring type functions
      makes the test for #3064 go bad.  So somehow the current,
      inconsistent situation was an accidental sweet spot.
      
      But it's a horrible sweet spot, relying on what was essentially
      a bug.  So I've accepted the worsening (it's an exotic case),
      and opened #12724 to deal with the underlying cause.
      1f09b246