This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 10 Jan, 2017 8 commits
  2. 09 Jan, 2017 2 commits
  3. 08 Jan, 2017 1 commit
    • Ömer Sinan Ağacan's avatar
      Parse holes as infix operators · 6c869f90
      Ömer Sinan Ağacan authored
      Reported as #13050. Since holes are expressions but not identifiers,
      holes were not allowed in infix operator position. This patch introduces
      a new production in infix operator parser to allow this.
      
      Reviewers: simonpj, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, RyanGlScott, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2910
      
      GHC Trac Issues: #13050
      6c869f90
  4. 07 Jan, 2017 1 commit
  5. 06 Jan, 2017 10 commits
    • Facundo Domínguez's avatar
      Have addModFinalizer expose the local type environment. · c1ed9557
      Facundo Domínguez authored
      Kind inference in ghci was interfered when renaming of type splices
      introduced the HsSpliced data constructor. This patch has kind
      inference skip over it.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, rrnewton, bgamari, goldfire, austin
      
      Subscribers: thomie, mboes
      
      Differential Revision: https://phabricator.haskell.org/D2886
      
      GHC Trac Issues: #12985
      c1ed9557
    • Facundo Domínguez's avatar
      c5452cc1
    • Matthew Pickering's avatar
      54227a45
    • Facundo Domínguez's avatar
      Have addModFinalizer expose the local type environment. · e5d1ed9c
      Facundo Domínguez authored
      Summary:
      Kind inference in ghci was interfered when renaming of type splices
      introduced the HsSpliced data constructor. This patch has kind
      inference skip over it.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, rrnewton, austin, goldfire, bgamari
      
      Reviewed By: goldfire, bgamari
      
      Subscribers: thomie, mboes
      
      Differential Revision: https://phabricator.haskell.org/D2886
      
      GHC Trac Issues: #12985
      e5d1ed9c
    • Matthew Pickering's avatar
      Add missing stderr file for T13035 · f3c7cf9b
      Matthew Pickering authored
      f3c7cf9b
    • Simon Marlow's avatar
      More fixes for #5654 · 3a18baff
      Simon Marlow authored
      * In stg_ap_0_fast, if we're evaluating a thunk, the thunk might
        evaluate to a function in which case we may have to adjust its CCS.
      
      * The interpreter has its own implementation of stg_ap_0_fast, so we
        have to do the same shenanigans with creating empty PAPs and copying
        PAPs there.
      
      * GHCi creates Cost Centres as children of CCS_MAIN, which enterFunCCS()
        wrongly assumed to imply that they were CAFs.  Now we use the is_caf
        flag for this, which we have to correctly initialise when we create a
        Cost Centre in GHCi.
      3a18baff
    • Ryan Scott's avatar
      Add performance test for #13056 · 50881100
      Ryan Scott authored
      This performance regression was fixed by commit
      517d03e4 (#12234). Let's add a performance test
      to ensure that it doesn't break again.
      50881100
    • Simon Peyton Jones's avatar
      Fix the implementation of the "push rules" · b4f2afe7
      Simon Peyton Jones authored
      Richard pointed out (comment:12 of Trac #13025) that my
      implementation of the coercion "push rules", newly added
      in exprIsConAppMaybe by commit b4c3a668, wasn't quite right.
      
      But in fact that means that the implementation of those same
      rules in Simplify.simplCast was wrong too.
      
      Hence this commit:
      
      * Refactor the push rules so they are implemented in just
        one place (CoreSubst.pushCoArgs, pushCoTyArg, pushCoValArg)
        The code in Simplify gets simpler, which is nice.
      
      * Fix the bug that Richard pointed out (to do with hetero-kinded
        coercions)
      
      Then compiler performance worsened, which led mt do discover
      two performance bugs:
      
      * The smart constructor Coercion.mkNthCo didn't have a case
        for ForAllCos, which meant we stupidly build a complicated
        coercion where a simple one would do
      
      * In OptCoercion there was one place where we used CoherenceCo
        (the data constructor) rather than mkCoherenceCo (the smart
        constructor), which meant that the the stupid complicated
        coercion wasn't optimised away
      
      For reasons I don't fully understand, T5321Fun did 2% less compiler
      allocation after all this, which is good.
      b4f2afe7
    • Simon Peyton Jones's avatar
      Avoid exponential blowup in FamInstEnv.normaliseType · 3540d1e1
      Simon Peyton Jones authored
      Trac #13035 showed up a nasty case where we took exponentially
      long to normalise a (actually rather simple) type.  Fortunately
      it was easy to fix: see Note [Normalisation and type synonyms].
      3540d1e1
    • Simon Peyton Jones's avatar
      Use the right in-scope set · e6aefd6e
      Simon Peyton Jones authored
      I tripped over these calls to substTyWith that didn't obey the
      precondition about in-scope variables.  Easily fixed, happily.
      e6aefd6e
  6. 05 Jan, 2017 8 commits
    • David Feuer's avatar
      Coerce for fmapDefault and foldMapDefault · 5f91ac89
      David Feuer authored
      Define `fmapDefault = coerce traverse` and `foldMapDefault = coerce
      traverse`.  This ensures that we won't get unnecessary allocation and
      indirection when the arguments don't inline.
      
      Fixes #13058
      
      Reviewers: ekmett, RyanGlScott, austin, hvr, bgamari
      
      Reviewed By: RyanGlScott
      
      Subscribers: simonpj, RyanGlScott, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2916
      
      GHC Trac Issues: #13058
      5f91ac89
    • Oleg Grenrus's avatar
      Fix doctests in Data.Functor · 5ef956e1
      Oleg Grenrus authored
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2920
      
      GHC Trac Issues: #11551
      5ef956e1
    • Chris Martin's avatar
      Remove single top-level section in Foldable docs · 5797784c
      Chris Martin authored
      This fixes a mild annoyance in the haddock output for Data.Foldable.
      The section outline had a single top-level heading, which doesn't serve
      any purpose as far as I can tell.
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2922
      5797784c
    • alexbiehl's avatar
      Use atomic counter for GHC.Event.Unique · 5d2a92a1
      alexbiehl authored
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2905
      5d2a92a1
    • Joachim Breitner's avatar
      Add a CSE pass to Stg (#9291) · 19d5c731
      Joachim Breitner authored
      This CSE pass only targets data constructor applications. This is
      probably the best we can do, as function calls and primitive operations
      might have side-effects.
      
      Introduces the flag -fstg-cse, enabled by default with -O for now. It
      might also be a good candiate for -O2.
      
      Differential Revision: https://phabricator.haskell.org/D2871
      19d5c731
    • Simon Peyton Jones's avatar
      Ensure nested binders have Internal Names · baf9ebe5
      Simon Peyton Jones authored
      This is a long-standing bug.  A nested (non-top-level) binder
      in Core should not have an External Name, like M.x. But
      
      - Lint was not checking this invariant
      
      - The desugarer could generate programs that failed the
        invariant.  An example is in
        tests/deSugar/should_compile/T13043, which had
           let !_ = M.scState in ...
        This desugared to
           let ds = case M.scSate of M.scState { DEFAULT -> () }
           in case ds of () -> ...
      
        We were wrongly re-using that scrutinee as a case binder.
        And Trac #13043 showed that could ultimately lead to two
        top-level bindings with the same closure name.  Alas!
      
      - The desugarer had one other place (in DsUtils.mkCoreAppDs)
        that could generate bogus code
      
      This patch fixes all three bugs, and adds a regression test.
      baf9ebe5
    • Simon Peyton Jones's avatar
      Minor refactoring in CSE · c909e6ec
      Simon Peyton Jones authored
      I noticed that CSE.addBinding was always returning one of its own
      inputs, so I refactored to avoid doing so.
      
      No change in behaviour.
      c909e6ec
    • Simon Peyton Jones's avatar
      Remove a redundant test · 26646418
      Simon Peyton Jones authored
      postInlineUnconditionally was testing for isExportedId, but it was
      /also/ testing for top-level-ness, which is redundant.  This patch
      just removes the redundant test, and documents it.
      26646418
  7. 04 Jan, 2017 1 commit
  8. 03 Jan, 2017 3 commits
  9. 02 Jan, 2017 5 commits
    • Edward Z. Yang's avatar
      Refactor importdecls/topdecls parsing. · 8d63ca98
      Edward Z. Yang authored
      
      
      Previously, we had the following parser:
      
          xs : xs ';' x
             | xs ';'
             | x
      
      This is a very clever construction that handles duplicate,
      leading and trailing semicolons well, but it didn't work very
      well with annotations, where we wanted to attach the annotation
      for a semicolon to the *previous* x in the list.  This lead
      to some very disgusting code in the parser.
      
      This commit refactors the parser into this form:
      
          semis1 : semis1 ';'
                 | ';'
          xs_semi : xs x semis1
                  | {- empty -}
          xs : xs_semi x
      
      Now, when we parse one or more semicolons after an x, we can
      attach them immediately, eliminating some very grotty annotations
      swizzling that was previously in the parser.
      
      We now need to write the top-level parser for imports and then
      declarations in a slightly special way now:
      
          top : semis top1
          top1 : importdecls_semi topdecls_semi
               | importdecls_semi topdecls
               | importdecls
      
      This is because the *_semi parsers always require a semicolon,
      but we're allowed to omit that last newline.  So we need
      special cases to handle each of the possible cases where we
      may run out of semicolons. I don't know if there is a better
      way to structure this, but it is not much more complicated
      than what we had before for top (and asymptotically better!)
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonmar, austin, alanz, bgamari
      
      Reviewed By: alanz, bgamari
      
      Subscribers: thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D2893
      8d63ca98
    • Maciej Bielecki's avatar
      Don't suggest enabling TypeApplications when it's already enabled · b28ca38e
      Maciej Bielecki authored
      Previously when encountering EAsPat in an expression context,
      TypeApplications was suggested even when already enabled. This patch
      replaces the suggestion with more appropriate message.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari, mpickering, goldfire, simonpj
      
      Reviewed By: mpickering, goldfire, simonpj
      
      Subscribers: simonpj, goldfire, mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2877
      
      GHC Trac Issues: #12879
      b28ca38e
    • Matthew Pickering's avatar
      Update .mailmap · cc0abfa4
      Matthew Pickering authored
      cc0abfa4
    • sean's avatar
      Disallow users to write instances of KnownNat and KnownSym · c5609577
      sean authored
      As noted in #12837, these classes are special and the user should
      not be able to define their own instances.
      
      Test Plan: Validate
      
      Reviewers: adamgundry, goldfire, mpickering, austin, bgamari
      
      Reviewed By: goldfire, mpickering
      
      Subscribers: goldfire, mpickering, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2898
      
      GHC Trac Issues: #12837
      c5609577
    • Edward Z. Yang's avatar
      9ff07382
  10. 01 Jan, 2017 1 commit