1. 09 May, 2015 1 commit
  2. 08 May, 2015 2 commits
  3. 07 May, 2015 2 commits
    • Alan Zimmerman's avatar
      ApiAnnotations : RdrHsSyn.isFunLhs discards parentheses · 5bde9f7c
      Alan Zimmerman authored
      Summary:
      The RdrHsSyn.isFunLhs function has the following
      
        isFunLhs e = go e []
         where
           go (L loc (HsVar f)) es
                | not (isRdrDataCon f)   = return (Just (L loc f, False, es))
           go (L _ (HsApp f e)) es       = go f (e:es)
           go (L _ (HsPar e))   es@(_:_) = go e es
      
      The treatment of HsPar means that any parentheses around an infix function will be discarded.
      
      e.g.
      
        (f =*= g) sa i = f (toF sa i) =^= g (toG sa i)
      
      will lose the ( before f and the closing one after g
      
      Test Plan: ./validate
      
      Reviewers: hvr, austin
      
      Reviewed By: austin
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D832
      
      GHC Trac Issues: #10269
      5bde9f7c
    • Simon Peyton Jones's avatar
      Regression test for Trac #10390 · c3e6b3ac
      Simon Peyton Jones authored
      c3e6b3ac
  4. 06 May, 2015 9 commits
  5. 04 May, 2015 3 commits
    • Edward Z. Yang's avatar
      Give a hint when a TH splice has a bad package key, partially fixes #10279 · bf4f3e65
      Edward Z. Yang authored
      Previously, if we got a package key in our splice, we'd give
      a very unhelpful error message saying we couldn't find
      a package 'base-4.7.0.1', despite there being a package with
      that source package ID.  Really, we couldn't find a package with
      that *key*, so clarify, and also tell the user what the real
      package key is.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      bf4f3e65
    • Erik de Castro Lopo's avatar
      Fix safeHaskell test for llvm backend · f7dfcef4
      Erik de Castro Lopo authored
      Test was failing (could not execute: pgmlc) for arm (which uses
      the llvm backend) due to the `-pgmlc pgmlc` in OPTIONS_GHC. It
      was also failing on amd64 in the same way when `-fllvm` was
      added to the command line. Its safe to remove because the
      compiler should already know which llvm tool to use.
      
      Test Plan: validate
      
      Reviewers: dterei, austin
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D874
      f7dfcef4
    • Adam Gundry's avatar
      Permit empty closed type families · 4efa4213
      Adam Gundry authored
      Fixes #9840 and #10306, and includes an alternative resolution to #8028.
      This permits empty closed type families, and documents them in the user
      guide. It updates the Haddock submodule to support the API change.
      
      Test Plan: Added `indexed-types/should_compile/T9840` and updated
      `indexed-types/should_fail/ClosedFam4` and `th/T8028`.
      
      Reviewers: austin, simonpj, goldfire
      
      Reviewed By: goldfire
      
      Subscribers: bgamari, jstolarek, thomie, goldfire
      
      Differential Revision: https://phabricator.haskell.org/D841
      
      GHC Trac Issues: #9840, #10306
      4efa4213
  6. 01 May, 2015 1 commit
    • Simon Peyton Jones's avatar
      Move IP, Symbol, Nat to ghc-prim · 2f6a0ac7
      Simon Peyton Jones authored
      This motivation is to declare class IP much earlier (in ghc-prim),
      so that implicit parameters (which depend on IP) is available
      to library code, notably the 'error' function.
      
      * Move class IP from base:GHC.IP
                      to ghc-prim:GHC.Classes
      * Delete module GHC.IP from base
      
      * Move types Symbol and Nat
            from base:GHC.TypeLits
            to ghc-prim:GHC.Types
      
      There was a name clash in GHC.RTS.Flags, where I renamed
      the local type Nat to RtsNat.
      2f6a0ac7
  7. 30 Apr, 2015 2 commits
    • Gabor Greif's avatar
      Typo fixes (mostly in comments) · a3f7517e
      Gabor Greif authored
      a3f7517e
    • Simon Peyton Jones's avatar
      Tidy up treatment of FlexibleContexts · b83160d0
      Simon Peyton Jones authored
      Previously (Trac #10351) we could get
      
          Non type-variable argument in the constraint: C [t]
          (Use FlexibleContexts to permit this)
          When checking that `f' has the inferred type
            f :: forall t. C [t] => t -> ()
      
      which is a bit stupid: we have *inferred* a type that we
      immediately *reject*.  This patch arranges that that the
      generalisation mechanism (TcSimplify.decideQuantification)
      doesn't pick a predicate that will be rejected by the
      subsequent validity check.
      
      This forced some minor refactoring, as usual.
      b83160d0
  8. 29 Apr, 2015 2 commits
    • Simon Peyton Jones's avatar
      Test Trac #10226 · d4a926ba
      Simon Peyton Jones authored
      Fixed by the patch for #10009
      d4a926ba
    • Simon Peyton Jones's avatar
      Improve improvement in the constraint solver · a1275a76
      Simon Peyton Jones authored
      This regrettably-big patch substantially improves the way in which
      "improvement" happens in the constraint solver.  It was triggered by
      trying to crack Trac #10009, but it turned out to solve #10340 as
      well.
      
      The big picture, with several of the trickiest examples, is described
      in Note [The improvement story] in TcInteract.
      
      The major change is this:
      
      * After solving we explicitly try "improvement", by
           - making the unsolved Wanteds into Deriveds
           - allowing Deriveds to rewrite Deriveds
        This more aggressive rewriting "unlocks" some extra
        guess-free unifications.
      
      * The main loop is in TcInteract.solveSimpleWanteds, but I also ended
        up refactoring TcSimplify.simpl_loop, and its surrounding code.
      
        Notably, any insolubles from the Givens are pulled out
        and treated separately, rather than staying in the inert set
        during the solveSimpleWanteds loop.
      
      There are a lot of follow-on changes
      
      * Do not emit generate Derived improvements from Wanteds.
        This saves work in the common case where they aren't needed.
      
      * For improvement we should really do type-class reduction on Derived
        constraints in doTopReactDict.  That entailed changing the GenInst
        constructor a bit; a local and minor change
      
      * Some annoying faffing about with dropping derived constraints;
        see dropDerivedWC, dropDerivedSimples, dropDerivedInsols,
        and their Notes.
      
      * Some substantial refactoring in TcErrors.reportWanteds.
        This work wasn't strictly forced, but I got sucked into it.
        All the changes are in TcErrors.
      
      * Use TcS.unifyTyVar consistently, rather than setWantedTyBind,
        so that unifications are properly tracked.
      
      * Refactoring around solveWantedsTcM, solveWantedsAndDrop.
        They previously guaranteed a zonked result, but it's more
        straightforward for clients to zonk.
      a1275a76
  9. 25 Apr, 2015 1 commit
  10. 24 Apr, 2015 5 commits
  11. 22 Apr, 2015 8 commits
  12. 21 Apr, 2015 1 commit
  13. 18 Apr, 2015 1 commit
  14. 17 Apr, 2015 2 commits