1. 20 Jul, 2016 8 commits
    • Ben Gamari's avatar
      InstEnv: Ensure that instance visibility check is lazy · ed480981
      Ben Gamari authored
      Previously instIsVisible had completely broken the laziness of
      lookupInstEnv' since it would examine is_dfun_name to check the name of
      the defining module (to know whether it is an interactive module). This
      resulted in the visibility check drawing in an interface file
      unnecessarily. This contributed to the unnecessary regression in
      compiler allocations reported in #12367.
      Test Plan: Validate, check nofib changes
      Reviewers: simonpj, ezyang, austin
      Reviewed By: ezyang
      Subscribers: thomie, ezyang
      Differential Revision: https://phabricator.haskell.org/D2411
      GHC Trac Issues: #12367
    • thomasw's avatar
      Update docs for partial type signatures (#12365) · 627c767b
      thomasw authored
      * Update the sample error messages. The messages have been reworded and
        reformatted since GHC 7.10.
      * Mention `TypeApplications` in "Where can they occur?"
      * The name of a named wild card is no longer used in the name of a
        resulting type variable. Before: `_foo` => `w_foo`, now: `_foo` => `t`
        or `a`.
      Test Plan: generate the users guide
      Reviewers: goldfire, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2413
      GHC Trac Issues: #12365
    • Dylan Meysmans's avatar
      Data.Either: Add fromLeft and fromRight (#12402) · a0f83a62
      Dylan Meysmans authored
      Reviewers: austin, hvr, RyanGlScott, bgamari
      Reviewed By: RyanGlScott, bgamari
      Subscribers: RyanGlScott, thomie
      Differential Revision: https://phabricator.haskell.org/D2403
      GHC Trac Issues: #12402
    • Moritz Angermann's avatar
      Cleanup PosixSource.h · cac3fb06
      Moritz Angermann authored
      When trying to build arm64-apple-iso, the build fell over
      `strdup`, as the arm64-apple-ios build did not fall into `darwin_HOST_OS`,
      and would need `ios_HOST_OS`.
      This diff tries to clean up PosixSource.h, instead of layering another
      define on top.
      As we use `strnlen` in sources that include PosixSource.h, and `strnlen`
      is defined in POSIX.1-2008, the `_POSIX_C_SOURCE` and `_XOPEN_SOURCE`
      are increased accordingly.
      Furthermore the `_DARWIN_C_SOURCE` (required for `u_char`, etc. used in
      sysctl.h) define is moved into `OSThreads.h` alongside a similar ifdef
      for freebsd.
      Test Plan: Build on all supported platforms.
      Reviewers: rwbarton, erikd, austin, hvr, simonmar, bgamari
      Reviewed By: simonmar, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2375
    • seraphime's avatar
      Fix bytecode generator panic · 8de6e13f
      seraphime authored
      This fixes #12128.
      The bug was introduced in 1c9fd3f1.
      Test Plan: ./validate
      Reviewers: simonmar, austin, hvr, simonpj, bgamari
      Reviewed By: bgamari
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D2374
      GHC Trac Issues: #12128
    • 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.
    • 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
    • Ö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
      This patch implements support for SCC annotations in declaration
      contexts. This is now a valid program:
          f x y = ...
              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
  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
      `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
    • Ryan Scott's avatar
      Fix Template Haskell reification of unboxed tuple types · 514c4a47
      Ryan Scott authored
      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
    • Ryan Scott's avatar
      Make DeriveFunctor work with unboxed tuples · 3fa3fe8a
      Ryan Scott authored
      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
    • Ryan Scott's avatar
      Fix misspellings of the word "instance" in comments · d213ab3f
      Ryan Scott authored
      [ci skip]
  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
      Performance measurements do unfortunately not show significant
      improvements or regessions.
      Differential Revision: https://phabricator.haskell.org/D2395
  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.
    • 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
      Reviewers: simonpj, austin, simonmar
      Reviewed By: simonmar
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2385
      GHC Trac Issues: #12357
  11. 09 Jul, 2016 1 commit
  12. 08 Jul, 2016 9 commits
  13. 07 Jul, 2016 1 commit