Commits on Jul 20, 2016
  1. @RyanGlScott

    Make Data.{Bifoldable,Bitraversable} -XSafe

    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
    RyanGlScott committed Jul 20, 2016
  2. @osa1

    Support SCC pragmas in declaration context

    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
    osa1 committed Jul 20, 2016
Commits on Jul 19, 2016
  1. @pgj
Commits on Jul 18, 2016
  1. @RyanGlScott

    Make okConIdOcc recognize unboxed tuples

    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
    RyanGlScott committed Jul 18, 2016
  2. @RyanGlScott

    Fix Template Haskell reification of unboxed tuple types

    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
    RyanGlScott committed Jul 18, 2016
  3. @RyanGlScott

    Make DeriveFunctor work with unboxed tuples

    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
    RyanGlScott committed Jul 18, 2016
  4. @RyanGlScott
Commits on Jul 16, 2016
  1. @bgamari

    hp2ps: fix invalid PostScript for names with parentheses

    The names in the .hp files may contain un-matched opening parentheses,
    so escape them.
    
    GHC Trac: #9517
    
    Reviewers: bgamari, austin
    
    Reviewed By: bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2398
    
    GHC Trac Issues: #9517
    bgamari committed Jul 17, 2016
  2. @thomie @bgamari

    Pretty: remove a harmful $! (#12227)

    This is backport of [1] for GHC's copy of Pretty. See Note [Differences
    between libraries/pretty and compiler/utils/Pretty.hs].
    
    [1] http://git.haskell.org/packages/pretty.git/commit/bbe9270c5f849a5bb74c9166a5f4202cfb0dba22
        haskell/pretty#32
        haskell/pretty#35
    
    Reviewers: bgamari, austin
    
    Reviewed By: austin
    
    Differential Revision: https://phabricator.haskell.org/D2397
    
    GHC Trac Issues: #12227
    thomie committed with bgamari Jul 17, 2016
  3. @vTurbine @bgamari

    CodeGen: Way to dump cmm only once (#11717)

    The `-ddump-cmm` put all stages of Cmm processing into one output.
    This patch changes its behavior and adds two more options to make
    Cmm dumping flexible.
    
    - `-ddump-cmm-from-stg` dumps only initial version of  Cmm right after
       STG->Cmm codegen
    - `-ddump-cmm` dumps the final result of the Cmm pipeline processing
    - `-ddump-cmm-verbose` dumps intermediate output of each Cmm pipeline
       step
    - `-ddump-cmm-proc` and `-ddump-cmm-caf` seems were lost. Now enabled
    
    Test Plan: ./validate
    
    Reviewers: thomie, simonmar, austin, bgamari
    
    Reviewed By: thomie, simonmar
    
    Subscribers: simonpj, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2393
    
    GHC Trac Issues: #11717
    vTurbine committed with bgamari Jul 17, 2016
  4. @bgamari

    Bugfix for bug 11632: `readLitChar` should consume null characters

    Test Plan: The tests have been included. This change deals with a
    relatively minor edge case and should not break unrelated functionality.
    
    Reviewers: thomie, #core_libraries_committee, ekmett, bgamari
    
    Reviewed By: #core_libraries_committee, ekmett, bgamari
    
    Subscribers: bgamari, ekmett
    
    Differential Revision: https://phabricator.haskell.org/D2391
    
    GHC Trac Issues: #11632
    bgamari committed Jul 17, 2016
  5. @bgamari @bgamari

    Binary: Use ByteString's copy in getBS

    It's unclear how much of an effect on runtime this will have, but if
    nothing else the code generation may be a tad better since the system's
    `memcpy` will be used.
    
    Test Plan: Validate
    
    Reviewers: simonmar, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2401
    bgamari committed with bgamari Jul 16, 2016
  6. @bgamari @bgamari

    IfaceEnv: Only check for built-in OccNames if mod is GHC.Types

    This check is not entirely cheap and will not succeed unless we are
    looking for something in the module where built-in syntax lives,
    GHC.Types.
    
    Reviewers: simonpj, austin
    
    Subscribers: simonpj, thomie, osa1
    
    Differential Revision: https://phabricator.haskell.org/D2400
    bgamari committed with bgamari Jul 16, 2016
  7. @bgamari @bgamari

    Log heap profiler samples to event log

    Test Plan: Try it
    
    Reviewers: hvr, simonmar, austin, erikd
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1722
    
    GHC Trac Issues: #11094
    bgamari committed with bgamari Jun 16, 2016
Commits on Jul 15, 2016
  1. @RyanGlScott

    Bring comments in TcGenGenerics up to date

    [ci skip]
    RyanGlScott committed Jul 15, 2016
Commits on Jul 14, 2016
  1. @Icelandjack @RyanGlScott

    Added type family dependency to Data.Type.Bool.Not

    Summary:
    
    Signed-off-by: Baldur Blöndal <baldurpet@gmail.com>
    
    Reviewers: goldfire, RyanGlScott, austin, bgamari, hvr
    
    Reviewed By: RyanGlScott, austin
    
    Subscribers: RyanGlScott, thomie
    
    Differential Revision: https://phabricator.haskell.org/D2268
    
    GHC Trac Issues: #12057
    Icelandjack committed with RyanGlScott Jul 14, 2016
  2. @nomeata

    tidyOccNames: Rename variables fairly

    So that
    > :t (id,id,id)
    produces
    (id,id,id) :: (a3 -> a3, a2 -> a2, a1 -> a1)
    instead of
    (id,id,id) :: (a2 -> a2, a1 -> a1, a -> a)
    
    Differential Revision: https://phabricator.haskell.org/D2402
    nomeata committed Jul 12, 2016
Commits on Jul 13, 2016
  1. @nomeata

    tidyType: Rename variables of nested forall at once

    this refactoring commit prepares for fixing #12382, which can now be
    implemented soley in tidyTyCoVarBndrs.
    nomeata committed Jul 12, 2016
Commits on Jul 12, 2016
  1. @nomeata

    Demand analyser: Implement LetUp rule (#12370)

    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
    nomeata committed Jul 6, 2016
Commits on Jul 11, 2016
  1. @thomie

    Pretty: delete really old changelog

    This changelog is very incomplete, and basically useless. I'm removing
    it, because it made it harder to compare this copy of `Pretty.hs` with
    the copy in `libraries/pretty` (from which a similar changelog was
    deleted some time ago).
    thomie committed Jul 11, 2016
  2. @simonmar
Commits on Jul 10, 2016
  1. @alanz

    check-api-annotations utility loads by filename

    Previously it loaded by modulename, which prevented loading files with a
    Main module.
    alanz committed Jul 10, 2016
  2. @bgamari @bgamari

    TysWiredIn: Use UniqFM lookup for built-in OccNames

    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
    bgamari committed with bgamari Jul 9, 2016
Commits on Jul 9, 2016
  1. @thomie

    Testsuite: expose TEST_CC (path to gcc)

    Reviewed by: Phyx
    
    Differential Revision: https://phabricator.haskell.org/D2394
    thomie committed Jul 9, 2016
Commits on Jul 8, 2016
  1. @bgamari @bgamari

    DsExpr: Remove usage of concatFS in fingerprintName

    This was the only user of concatFS and really just wants the `String`
    anyways.
    
    Stumbled upon while looking at #12357.
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2386
    bgamari committed with bgamari Jul 8, 2016
  2. @niteria

    Kill eltsUFM in classifyTyCons

    GHC Trac: #4012
    niteria committed Jul 8, 2016
  3. @bgamari @bgamari

    OccName: Avoid re-encoding derived OccNames

    Previously we would form derived OccNames by first decoding the name
    being derived from, manipulating it in [Char] form, and then
    re-encoding. This is all very wasteful as we essentially always just
    want to concatenate. Instead we now take care to form the final name
    with only one concatFS.
    
    Test Plan: Validate, examing compiler allocations
    
    Reviewers: simonpj, austin
    
    Reviewed By: simonpj
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2387
    
    GHC Trac Issues: #12357
    bgamari committed with bgamari Jul 8, 2016
  4. @bgamari @bgamari

    OccName: Implement startsWithUnderscore in terms of headFS

    This avoids decoding the entire string just to look at the first
    character.
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2388
    bgamari committed with bgamari Jul 8, 2016
  5. @bgamari @bgamari

    FastString: Supply mconcat implementation

    Test Plan: Validate
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2389
    bgamari committed with bgamari Jul 8, 2016
  6. @bgamari
  7. @bgamari

    FastString: Reduce allocations of concatFS

    Instead of unpacking and then repacking we simply concatenate all of the
    individual ByteStrings.
    bgamari committed Jul 4, 2016
  8. @bgamari
  9. @niteria

    Use UniqDFM for InstEnv

    Rationale in the comment.
    Also updates submodule array with test output changes.
    
    GHC Trac: #4012
    niteria committed Jul 7, 2016
Commits on Jul 7, 2016
  1. @osa1

    Utils: Fix `lengthIs` and `lengthExceeds` for negative args

    Credits goes to SPJ for finding this.
    osa1 committed Jul 7, 2016
  2. @niteria

    Add Note [FamInstEnv determinism]

    I'm just turning previous commit message into a Note
    
    GHC Trac: #4012
    niteria committed Jul 7, 2016