1. 21 May, 2015 3 commits
    • Alan Zimmerman's avatar
      ApiAnnotatons : AnnDcolon in wrong place for PatBind · c488da85
      Alan Zimmerman authored
      Summary:
      In the following code fragment
      
          let ls :: Int = undefined
      
      the `::` is attached to the ls function as a whole, rather than to the
      pattern on the LHS.
      
      Test Plan: ./validate
      
      Reviewers: hvr, austin
      
      Reviewed By: austin
      
      Subscribers: bgamari, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D883
      
      GHC Trac Issues: #10396
      c488da85
    • Alan Zimmerman's avatar
      ApiAnnotations : parens around a context with wildcard loses annotations · 0df14b5d
      Alan Zimmerman authored
      Summary:
      In the following code, the extra set of parens around the context end up
      with detached annotations.
      
          {-# LANGUAGE PartialTypeSignatures #-}
          module ParensAroundContext where
      
          f :: ((Eq a, _)) => a -> a -> Bool
          f x y = x == y
      
      Trac ticket #10354
      
      It turns out it was the TupleTy that was the culprit.
      
      This may also solve #10315
      
      Test Plan: ./validate
      
      Reviewers: hvr, austin, goldfire
      
      Reviewed By: austin
      
      Subscribers: goldfire, bgamari, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D868
      
      GHC Trac Issues: #10354, #10315
      0df14b5d
    • Alan Zimmerman's avatar
      ApiAnnotations : AST version of nested forall loses forall annotation · c553e980
      Alan Zimmerman authored
      Summary:
      When parsing
      
          {-# LANGUAGE ScopedTypeVariables #-}
      
          extremumNewton :: forall tag. forall tag1.
                             tag -> tag1 -> Int
          extremumNewton = undefined
      
      the parser creates nested HsForAllTy's for the two forall statements.
      
      These get flattened into a single one in `HsTypes.mk_forall_ty`
      
      This patch removes the flattening, so that API Annotations are not lost in the
      process.
      
      Test Plan: ./validate
      
      Reviewers: goldfire, austin, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: bgamari, mpickering, thomie, goldfire
      
      Differential Revision: https://phabricator.haskell.org/D836
      
      GHC Trac Issues: #10278, #10315, #10354, #10363
      c553e980
  2. 20 May, 2015 1 commit
  3. 19 May, 2015 12 commits
  4. 18 May, 2015 8 commits
    • Sergei Trofimovich's avatar
      includes/stg/SMP.h: implement simple load_/store_load_barrier on armv6 and older · eaaa38ba
      Sergei Trofimovich authored
      Assuming there is no real SMP systems on these CPUs
      I've added only compiler barrier (otherwise write_barrier
      and friends need to be fixed as well).
      
      Patch also fixes build breakage reported in #10244.
      Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
      
      Reviewers: rwbarton, nomeata, austin
      
      Reviewed By: nomeata, austin
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D894
      
      GHC Trac Issues: #10244
      eaaa38ba
    • Simon Peyton Jones's avatar
      Make the "matchable-given" check happen first · 228ddb95
      Simon Peyton Jones authored
      This change makes the matchable-given check apply uniformly to
           - constraint tuples
           - natural numbers
           - Typeable
      as well as to vanilla class constraints.
      
      See Note [Instance and Given overlap] in TcInteract
      228ddb95
    • Simon Peyton Jones's avatar
      Refactor tuple constraints · ffc21506
      Simon Peyton Jones authored
      Make tuple constraints be handled by a perfectly ordinary
      type class, with the component constraints being the
      superclasses:
          class (c1, c2) => (c2, c2)
      
      This change was provoked by
      
        #10359  inability to re-use a given tuple
                constraint as a whole
      
        #9858   confusion between term tuples
                and constraint tuples
      
      but it's generally a very nice simplification. We get rid of
       -  In Type, the TuplePred constructor of PredTree,
          and all the code that dealt with TuplePreds
       -  In TcEvidence, the constructors EvTupleMk, EvTupleSel
      
      See Note [How tuples work] in TysWiredIn.
      
      Of course, nothing is ever entirely simple. This one
      proved quite fiddly.
      
      - I did quite a bit of renaming, which makes this patch
        touch a lot of modules. In partiuclar tupleCon -> tupleDataCon.
      
      - I made constraint tuples known-key rather than wired-in.
        This is different to boxed/unboxed tuples, but it proved
        awkward to have all the superclass selectors wired-in.
        Easier just to use the standard mechanims.
      
      - While I was fiddling with known-key names, I split the TH Name
        definitions out of DsMeta into a new module THNames.  That meant
        that the known-key names can all be gathered in PrelInfo, without
        causing module loops.
      
      - I found that the parser was parsing an import item like
            T( .. )
        as a *data constructor* T, and then using setRdrNameSpace to
        fix it.  Stupid!  So I changed the parser to parse a *type
        constructor* T, which means less use of setRdrNameSpace.
      
        I also improved setRdrNameSpace to behave better on Exact Names.
        Largely on priciple; I don't think it matters a lot.
      
      - When compiling a data type declaration for a wired-in thing like
        tuples (,), or lists, we don't really need to look at the
        declaration.  We have the wired-in thing!  And not doing so avoids
        having to line up the uniques for data constructor workers etc.
        See Note [Declarations for wired-in things]
      
      - I found that FunDeps.oclose wasn't taking superclasses into
        account; easily fixed.
      
      - Some error message refactoring for invalid constraints in TcValidity
      
      - Haddock needs to absorb the change too; so there is a submodule update
      ffc21506
    • Simon Peyton Jones's avatar
      Delete commented-out line · 76024fdb
      Simon Peyton Jones authored
      76024fdb
    • Simon Peyton Jones's avatar
      Test Trac #10248 · fa0bdd3d
      Simon Peyton Jones authored
      fa0bdd3d
    • Simon Peyton Jones's avatar
      Test Trac #10403 · f1f265df
      Simon Peyton Jones authored
      f1f265df
    • Simon Peyton Jones's avatar
      Test Trac #10359 · 3f42de51
      Simon Peyton Jones authored
      3f42de51
    • Joachim Breitner's avatar
      CmmCommonBlockElim: Improve hash function · 73f836f5
      Joachim Breitner authored
      Previously, the hash function used to cut down the number of block
      comparisons did not take local registers into account, causing far too
      many similar, but different bocks to be considered candidates for the
      (expensive!) comparision.
      
      Adding register to the hash takes CmmCommonBlockElim's share of the
      runtime of the example in #10397 from 17% to 2.5%, and eliminates all
      unwanted hash collisions.
      
      This patch also replaces the fancy trie by a plain Data.Map. It turned
      out to be not performance critical, so this simplifies the code.
      
      Differential Revision: https://phabricator.haskell.org/D896
      73f836f5
  5. 16 May, 2015 2 commits
  6. 15 May, 2015 1 commit
  7. 14 May, 2015 3 commits
  8. 13 May, 2015 10 commits