1. 09 May, 2017 1 commit
    • Ben Gamari's avatar
      Treat banged bindings as FunBinds · 37299536
      Ben Gamari authored
      This reworks the HsSyn representation to make banged variable patterns
      (e.g. !x = e) be represented as FunBinds instead of PatBinds, adding a flag to
      FunRhs to record the bang.
      
      Fixes #13594.
      
      Reviewers: austin, goldfire, alanz, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, rwbarton, thomie, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D3525
      37299536
  2. 08 May, 2017 8 commits
    • Michal Terepeta's avatar
      Dataflow: use IntSet for mkDepBlocks · b99bae6d
      Michal Terepeta authored
      Using `IntSet` instead of `[Int]` is nicer since it gets rid of
      appending to a list (in the backward case) and folding over it is
      ordered.
      
      I also added a comment about how `mkDepBlocks` works since its
      behavior can be a bit surprising at first sight (it took me some time
      to see that it's doing the right thing ;)
      Signed-off-by: Michal Terepeta's avatarMichal Terepeta <michal.terepeta@gmail.com>
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3530
      b99bae6d
    • Matthew Pickering's avatar
      Add a failing test for T13644 · c5b28e06
      Matthew Pickering authored
      The problem originates in TcPat.find_field_ty but I don't know how to
      clearnly fix it.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13644
      
      Differential Revision: https://phabricator.haskell.org/D3535
      c5b28e06
    • Nolan's avatar
      Make XNegativeLiterals treat -0.0 as negative 0 · 0279b745
      Nolan authored
      Reviewers: austin, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, mpickering
      
      GHC Trac Issues: #13211
      
      Differential Revision: https://phabricator.haskell.org/D3543
      0279b745
    • Moritz Angermann's avatar
      Fix Raspberry Pi · dc3b4af6
      Moritz Angermann authored
      This is two fold:
      
      - We did not catch all ARM_ARCH_6 defines. Specifically not `6K` and
        `6KZ`, which is what llvm seems to use these days for
        `arm-none-linux-gnueabihf` (e.g. the triple that's used for raspbian
        as well). Without it, ghc assums we want to compile against some armv7
        system, which raspbian is not (it is armv6 for maximum compatibility
        across the pi family, compromising on using armv7 and up features).
      
      - We stop forcing the -m and -arch flags on macOS. This is troublesome,
        as compiling for a 32bit system (e.g. raspberry pi, on a x86_64 macOS
        system results in the `-m64` flag being passed to to clang as well,
        which in turn figures out that you likely want 64bit, and rewrites
        your taret from `arm-none-linux-gnueabihf` to
        `aarch64-none-linux-gnueabihf`, which is definetly not what you want.
      
      Reviewers: austin, hvr, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, erikd
      
      Differential Revision: https://phabricator.haskell.org/D3546
      dc3b4af6
    • David Feuer's avatar
      Optimize casMutVar# for single-threaded RTS · ff7a3c4f
      David Feuer authored
      The single-threaded RTS shouldn't actually need to use CAS to
      implement `casMutVar#`; there are no other threads to coordinate
      with.
      
      Reviewers: austin, bgamari, erikd, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3544
      ff7a3c4f
    • Ben Gamari's avatar
      OptCoercion: Ensure that TyConApps match in arity · 87ff5d4f
      Ben Gamari authored
      Previously OptCoercion would potentially change the type of UnivCo
      coercions of the shape,
      ```
      co :: TyCon arg1 ... argN ~ TyCon arg1' ... argN'
      ```
      where the arities of the left and right applications differ. In this
      case we
      would try to zip the two argument lists, meaning that one would get
      truncated.
      
      One would think this could never happen since it implies we are
      applying the
      same TyCon to two different numbers of arguments. However, it does
      arise in the
      case of applications of the `Any` tycon, which arises from the
      typechecker (in
      `Data.Typeable.Internal`) where we end up with an `UnsafeCo`,
      ```
      co :: Any (Any -> Any) Any ~ Any (Any -> Any)
      ```
      
      Test Plan: Validate
      
      Reviewers: simonpj, austin, goldfire
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13658
      
      Differential Revision: https://phabricator.haskell.org/D3545
      87ff5d4f
    • Ben Gamari's avatar
      users-guide: Fix a variety of warnings · 476307ce
      Ben Gamari authored
      Including #13665.
      476307ce
    • niteria's avatar
      [Docs] Prefer cost centre · c685a447
      niteria authored
      There may be some subtlety I'm not seeing with the usage
      of center vs centre. Otherwise this makes it more consistent
      in the docs.
      There's one instance in 8.0.2-notes.rst, but I'm not sure if
      we want to modify it retroactively.
      
      Test Plan: harbormaster?
      
      Reviewers: bgamari, austin
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie, simonmar
      
      Differential Revision: https://phabricator.haskell.org/D3548
      c685a447
  3. 07 May, 2017 3 commits
  4. 06 May, 2017 3 commits
    • Ryan Scott's avatar
      Add regression test for #13651 · ed0c7f8b
      Ryan Scott authored
      Commit eb55ec29 ended up fixing #13651, so
      let's add a regression test for it.
      ed0c7f8b
    • Ryan Scott's avatar
      Add testsuite/timeout/TimeMe to .gitignore · 4a6cb5ef
      Ryan Scott authored
      Summary:
      If you run `make test` on a non-Windows OS from a fresh build, the
      testsuite will create an executable called `TimeMe` which `git` thinks is an
      untracked file. Let's add it to `.gitignore` to avoid polluting the list of
      untracked files.
      
      Test Plan: Run `make test`, check if `TimeMe` is in the `git` untracked files
      
      Reviewers: bgamari, austin
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3536
      4a6cb5ef
    • Ryan Scott's avatar
      Add regression tests for #12947, #13640 · 38a38191
      Ryan Scott authored
      Summary:
      Commit b4bdbe49 (the fix for #12156)
      wound up being the fix for #12947 and #13640 as well. This adds regression
      tests for the latter two tickets to keep them fixed.
      
      Test Plan: make test TEST="T12947 T13640"
      
      Reviewers: bgamari, austin
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #12947, #13640
      
      Differential Revision: https://phabricator.haskell.org/D3528
      38a38191
  5. 05 May, 2017 2 commits
  6. 04 May, 2017 18 commits
    • Ben Gamari's avatar
      TcTypeable: Simplify · c8e4d4b3
      Ben Gamari authored
      Simon pointed out that the zonk of the tyConKinds was redundant as tycon kinds
      will never contain mutable variables. This allows us to remove tycon_kind.
      Add a few commments clarifying the need to bring TyCon binders into scope before
      typechecking bindings.
      c8e4d4b3
    • Ben Gamari's avatar
      CoreTidy: Don't seq unfoldings · b3da6a6c
      Ben Gamari authored
      Previously we would force uf_is_value and friends to ensure that we didn't
      retain a reference to the pre-tidying template, resulting in a space leak.
      Instead, we now just reinitialize these fields (despite the fact that they
      should not have changed). This may result in a bit more computation, but most of
      the time we won't ever evaluate them anyways, so the damage shouldn't be so bad.
      
      See #13564.
      b3da6a6c
    • SantiM's avatar
      hpc: Output a legend at the top of output files · 8a2c2476
      SantiM authored
      Updates hpc submodule.
      
      Reviewers: austin, bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #11799
      
      Differential Revision: https://phabricator.haskell.org/D3465
      8a2c2476
    • Matthew Pickering's avatar
      Implement sequential name lookup properly · 1829d265
      Matthew Pickering authored
      Previously we would run all the monadic actions and then
      combine their results. This caused problems if later actions
      raised errors but earlier lookups suceeded. We only want to run later
      lookups if the earlier ones fail.
      
      Fixes #13622
      
      Reviewers: RyanGlScott, austin, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, rwbarton, thomie
      
      GHC Trac Issues: #13622
      
      Differential Revision: https://phabricator.haskell.org/D3515
      1829d265
    • Takenobu Tani's avatar
      Fix markdown for new GitHub Flavored Markdown · 74f31539
      Takenobu Tani authored
      Delete whitespace between brackets.  Because Github Flavored Markdown
      was changed [1].
      
      [1]: https://githubengineering.com/a-formal-spec-for-github-markdown/
      
      Test Plan: build
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3534
      74f31539
    • Ryan Scott's avatar
      Add regression test for #11616 · 03ca391f
      Ryan Scott authored
      The code in #11616 has been working for a while (ever since 8.0.1),
      so let's add a regression test for it to put the nail in the coffin.
      
      Test Plan: make test TEST=T11616
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #11616
      
      Differential Revision: https://phabricator.haskell.org/D3531
      03ca391f
    • Takenobu Tani's avatar
      Fix comment for compact region · 4fcaf8e9
      Takenobu Tani authored
      There were old module names:
      
       * Data.Compact -> GHC.Compact
       * Data.Compact.Internal -> GHC.Compact
      
      This commit is for ghc-8.2 branch.
      
      Test Plan: build
      
      Reviewers: austin, bgamari, hvr, erikd, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3522
      4fcaf8e9
    • Takenobu Tani's avatar
      user-guide: fix links to compact region · 0b41bbcd
      Takenobu Tani authored
      There were broken links in users_guide for compact region.
      
        * Data-Compact -> GHC-Compact
        * compact-@LIBRARY_compact_VERSION@ ->
      ghc-compact-@LIBRARY_compact_VERSION@
      
      This commit is for ghc-8.2 branch.
      
      Test Plan: build
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3521
      0b41bbcd
    • Douglas Wilson's avatar
      Pass -ffrontend-opt arguments to frontend plugin in the correct order · db10b799
      Douglas Wilson authored
      Previously they were passed in the reverse order that they're specified
      on the command line.
      
      Add a haddock to frontendPluginOpts in DynFlags.hs.
      
      Modify test frontend01 to cover the case of multiple -ffrontend-opt.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13632
      
      Differential Revision: https://phabricator.haskell.org/D3520
      db10b799
    • David Feuer's avatar
      Add an Eq instance for UniqSet · a660844c
      David Feuer authored
      I left that out by mistake, and it apparently breaks at least one
      existing plugin.
      
      Reviewers: christiaanb, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3518
      a660844c
    • Ben Gamari's avatar
      Bump nofib submodule · 41a00fa1
      Ben Gamari authored
      41a00fa1
    • Ben Gamari's avatar
      rts: Fix MachO from D3527 · 8a605504
      Ben Gamari authored
      We gave up on typedefing {Section,ObjectCode}FormatInfo structs but
      MachO never got the memo.
      8a605504
    • David Feuer's avatar
      Add test for #13320 · cb850e01
      David Feuer authored
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13320
      
      Differential Revision: https://phabricator.haskell.org/D3532
      cb850e01
    • Simon Peyton Jones's avatar
      2a097001
    • Simon Peyton Jones's avatar
      Remove unused import · 2a33f172
      Simon Peyton Jones authored
      2a33f172
    • Simon Peyton Jones's avatar
      Deal with exceptions in dsWhenNoErrs · e7701976
      Simon Peyton Jones authored
      Gracious me.  Ever since this patch
      
        commit 37445780
        Author: Jan Stolarek <jan.stolarek@p.lodz.pl>
        Date:   Fri Jul 11 13:54:45 2014 +0200
      
            Injective type families
      
      TcRnMonad.askNoErrs has been wrong. It looked like this
      
         askNoErrs :: TcRn a -> TcRn (a, Bool)
         askNoErrs m
          = do { errs_var <- newTcRef emptyMessages
               ; res  <- setErrsVar errs_var m
               ; (warns, errs) <- readTcRef errs_var
               ; addMessages (warns, errs)
               ; return (res, isEmptyBag errs) }
      
      The trouble comes if 'm' throws an exception in the TcRn monad.
      Then 'errs_var is never read, so any errors are simply lost.
      
      This mistake was then propgated into DsMonad.dsWhenNoErrs, where
      it gave rise to Trac #13642.
      
      Thank to Ryan for narrowing it down so sharply.
      
      I did some refactoring, as usual.
      e7701976
    • Gabor Greif's avatar
      Abandon typedefing the {Section,ObjectCode}FormatInfo structs · 81af480a
      Gabor Greif authored
      Summary:
      This is a follow-up to @angerman 's refactoring for ELF
      that happened with e5e8646d
      My previous commit a6675a93
      corrected a typedef redefinition issue with GCC v4.4
      (which is pervasive with RHEL 6). Now the problem has resurfaced.
      
      Instead of dancing after the different compiler's pipe, I decided
      to eliminate the typedefs altogether and refer to the struct
      namespace explicitly.
      
      Added a note to describe why typedefs are not
      applied on customisable structs.
      
      Reviewers: austin, bgamari, erikd, simonmar
      
      Subscribers: rwbarton, thomie, angerman
      
      Differential Revision: https://phabricator.haskell.org/D3527
      81af480a
    • Simon Peyton Jones's avatar
      Teach optCoecion about FunCo · 783dfa74
      Simon Peyton Jones authored
      I was seeing coercions like
      
         Nth 3 ((c2 -> c2) ; (c3 -> c4))
      
      which made me realise that optCoercion was doing a bad job
      of the (relatively new) FunCo.
      
      In particular, opt_trans_rule needs a FunCo/FunCo case,
      to go with the TyConAppCo/TyConAppCo case.  Easy.
      
      No behavioural change, some coercions will get smaller
      783dfa74
  7. 03 May, 2017 5 commits