1. 20 Jul, 2016 3 commits
    • Ben Gamari's avatar
      TcInteract: Add braces to matchClassInst trace output · 908f8e23
      Ben Gamari authored
      This allows you to easily move to the result in a well-equipped editor.
      908f8e23
    • Ryan Scott's avatar
      Make Data.{Bifoldable,Bitraversable} -XSafe · e46b7681
      Ryan Scott authored
      Test Plan:
      Previously, `Data.{Bifoldable,Bitraversable}` were being inferred as
      `Unsafe` due to a transitive `Data.Coerce` import from `Data.Functor.Utils`.
      This rectifies this unfortunate mistake.
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, phadej
      
      Differential Revision: https://phabricator.haskell.org/D2412
      e46b7681
    • Ömer Sinan Ağacan's avatar
      Support SCC pragmas in declaration context · 98b2c508
      Ömer Sinan Ağacan authored
      Not having SCCs at the top level is becoming annoying real quick. For
      simplest cases, it's possible to do this transformation:
      
          f x y = ...
          =>
          f = {-# SCC f #-} \x y -> ...
      
      However, it doesn't work when there's a `where` clause:
      
          f x y = <t is in scope>
            where t = ...
          =>
          f = {-# SCC f #-} \x y -> <t is out of scope>
            where t = ...
      
      Or when we have a "equation style" definition:
      
          f (C1 ...) = ...
          f (C2 ...) = ...
          f (C3 ...) = ...
          ...
      
      (usual solution is to rename `f` to `f'` and define a new `f` with a
      `SCC`)
      
      This patch implements support for SCC annotations in declaration
      contexts. This is now a valid program:
      
          f x y = ...
            where
              g z = ...
              {-# SCC g #-}
          {-# SCC f #-}
      
      Test Plan: This passes slow validate (no new failures added).
      
      Reviewers: goldfire, mpickering, austin, bgamari, simonmar
      
      Reviewed By: bgamari, simonmar
      
      Subscribers: simonmar, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2407
      98b2c508
  2. 19 Jul, 2016 1 commit
  3. 18 Jul, 2016 4 commits
    • Ryan Scott's avatar
      Make okConIdOcc recognize unboxed tuples · 1fc41d32
      Ryan Scott authored
      Summary:
      `okConIdOcc`, which validates that a type or constructor name is valid
      for splicing using Template Haskell, has a special case for tuples, but
      neglects to look for unboxed tuples, causing some sensible Template Haskell
      code involving unboxed tuples to be rejected.
      
      Fixes #12407.
      
      Test Plan: make test TEST=T12407
      
      Reviewers: austin, bgamari, hvr, goldfire
      
      Reviewed By: goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2410
      
      GHC Trac Issues: #12407
      1fc41d32
    • Ryan Scott's avatar
      Fix Template Haskell reification of unboxed tuple types · 514c4a47
      Ryan Scott authored
      Summary:
      Previously, Template Haskell reified unboxed tuple types as boxed
      tuples with twice the appropriate arity.
      
      Fixes #12403.
      
      Test Plan: make test TEST=T12403
      
      Reviewers: hvr, goldfire, austin, bgamari
      
      Reviewed By: goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2405
      
      GHC Trac Issues: #12403
      514c4a47
    • Ryan Scott's avatar
      Make DeriveFunctor work with unboxed tuples · 3fa3fe8a
      Ryan Scott authored
      Summary:
      Unboxed tuples have `RuntimeRep` arguments which `-XDeriveFunctor` was
      mistaking for actual data constructor arguments. As a result, a derived
      `Functor` instance for a datatype that contained an unboxed tuple would
      generate twice as many arguments as it needed for an unboxed tuple pattern
      match or expression. The solution is to simply put `dropRuntimeRepArgs` in the
      right place.
      
      Fixes #12399.
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, osa1
      
      Differential Revision: https://phabricator.haskell.org/D2404
      
      GHC Trac Issues: #12399
      3fa3fe8a
    • Ryan Scott's avatar
      Fix misspellings of the word "instance" in comments · d213ab3f
      Ryan Scott authored
      [ci skip]
      d213ab3f
  4. 16 Jul, 2016 7 commits
  5. 15 Jul, 2016 1 commit
  6. 14 Jul, 2016 2 commits
  7. 13 Jul, 2016 1 commit
  8. 12 Jul, 2016 1 commit
    • Joachim Breitner's avatar
      Demand analyser: Implement LetUp rule (#12370) · 45d8f4eb
      Joachim Breitner authored
      This makes the implementation match the description in the paper more
      closely: There, a let binding that is not a function has first its body
      analised, and then the binding’s RHS. This way, the demand on the bound
      variable by the body can be fed into the RHS, yielding more precise
      results.
      
      Performance measurements do unfortunately not show significant
      improvements or regessions.
      
      Differential Revision: https://phabricator.haskell.org/D2395
      45d8f4eb
  9. 11 Jul, 2016 2 commits
  10. 10 Jul, 2016 2 commits
    • Alan Zimmerman's avatar
      check-api-annotations utility loads by filename · 9a3df1f8
      Alan Zimmerman authored
      Previously it loaded by modulename, which prevented loading files with a
      Main module.
      9a3df1f8
    • Ben Gamari's avatar
      TysWiredIn: Use UniqFM lookup for built-in OccNames · f53d761d
      Ben Gamari authored
      Previously we would unpack the OccName into a String, then pattern match
      against this string. Due to the implementation of `unpackFS`, this
      actually unpacks the entire contents, even though we often only need to
      look at the first few characters.
      
      Here we take another approach: build a UniqFM with the known built-in
      OccNames, allowing us to use `FastString`'s hash-based comparison
      instead.
      
      Reviewers: simonpj, austin, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2385
      
      GHC Trac Issues: #12357
      f53d761d
  11. 09 Jul, 2016 1 commit
  12. 08 Jul, 2016 9 commits
  13. 07 Jul, 2016 6 commits
    • Ömer Sinan Ağacan's avatar
      Utils: Fix `lengthIs` and `lengthExceeds` for negative args · 6e280c2c
      Ömer Sinan Ağacan authored
      Credits goes to SPJ for finding this.
      6e280c2c
    • niteria's avatar
      Add Note [FamInstEnv determinism] · 64bce8c3
      niteria authored
      I'm just turning previous commit message into a Note
      
      GHC Trac: #4012
      64bce8c3
    • adityadivekar's avatar
      34085b50
    • niteria's avatar
      Use deterministic maps for FamInstEnv · 9858552d
      niteria authored
      We turn FamInstEnvs into lists in some places which
      don't directly affect the ABI. That happens in
      family consistency checks and when producing output
      for `:info`. Unfortunately that nondeterminism
      is nonlocal and it's hard to tell locally what it
      affects. Furthermore the envs should be relatively
      small, so it should be free to use deterministic
      maps here. Testing with nofib and ./validate detected
      no difference between UniqFM and UniqDFM.
      
      GHC Trac: #4012
      9858552d
    • niteria's avatar
      Document some codegen nondeterminism · 6ed7c479
      niteria authored
      Bit-for-bit reproducible binaries are not a goal for now,
      so this is just marking places that could be a problem.
      Doing this will allow eltsUFM to be removed and will
      leave only nonDetEltsUFM.
      
      GHC Trac: #4012
      6ed7c479
    • niteria's avatar
      Style changes for UniqFM · bedd6203
      niteria authored
      This file used the old style with type signatures
      separated from the code. As far as I understand
      the idea was to generate PostScript files from
      the source. I think the idea was abandoned and
      this more modern style is more common in the
      codebase.
      
      Test Plan: it still compiles
      
      Reviewers: austin, simonmar, bgamari
      
      Reviewed By: simonmar, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2383
      bedd6203