1. 20 Sep, 2015 2 commits
  2. 19 Sep, 2015 2 commits
    • eir@cis.upenn.edu's avatar
      Polish some error messages. · 8ee2b953
      eir@cis.upenn.edu authored
      8ee2b953
    • eir@cis.upenn.edu's avatar
      Fix #10815 by kind-checking type patterns against known kinds. · 2d4db40a
      eir@cis.upenn.edu authored
      tcFamTyPats now must take information about the instantiation of any
      class variables, when checking the instance of an associated type.
      
      Getting this to work out required some unexpected refactoring in
      TcDeriv. TcDeriv needs to look at class instances because of the
      possibility of associated datatypes with `deriving` specs. TcDeriv
      worked over the user-specified instances. But any data family instances
      were already processed, and TcDeriv had no way of finding the rep
      tycons. Indeed, TcDeriv *re-type-checked* any data family instances
      in an attempt to rediscover what GHC already knew. So, this commit
      introduces better tracking of compiled data families between TcInstDcls
      and TcDeriv to streamline all of this.
      2d4db40a
  3. 18 Sep, 2015 1 commit
  4. 17 Sep, 2015 4 commits
  5. 15 Sep, 2015 1 commit
    • Sebastian Reuße's avatar
      Pretty: fix unicode arrow operators. · 14c4090e
      Sebastian Reuße authored
      As per issue #10509, the documentation gave the wrong glyphs for Unicode
      alternatives to the -< and >- arrow operators (the codepoints were
      correct, but the glyphs were not). The incorrect glyphs have also
      made it into the error output. This replaces those characters with the
      correct versions.
      
      GHC Trac Issues: #10883
      14c4090e
  6. 12 Sep, 2015 1 commit
  7. 11 Sep, 2015 3 commits
  8. 10 Sep, 2015 1 commit
  9. 09 Sep, 2015 1 commit
  10. 08 Sep, 2015 1 commit
  11. 04 Sep, 2015 2 commits
  12. 03 Sep, 2015 3 commits
  13. 02 Sep, 2015 9 commits
    • thomie's avatar
      Testsuite: by default run all tests for a single way · c43c8e2c
      thomie authored
      `make test` now runs all tests for a single way only. Use `make slowtest` to
      get the previous behaviour (i.e. run all tests for all ways).
      
      The intention is to use this new `make test` setting for Phabricator, as
      a reasonable compromise between `make fasttest` (what it previously
      used) and a fullblown `make slowtest` (which runs all tests for all
      ways).
      
      See Note [validate and testsuite speed] in toplevel Makefile.
      
      Differential Revision: https://phabricator.haskell.org/D1178
      c43c8e2c
    • Eric Seidel's avatar
      Fix some tests that were broken by D861 · 32a9eada
      Eric Seidel authored
      I didn't realize that `./validate` does not run every test :(
      
      Test Plan: ./validate --slow
      
      Update submodule hpc.
      
      Differential Revision: https://phabricator.haskell.org/D1204
      32a9eada
    • thomie's avatar
      Testsuite: mark 4 tests expect_broken_for(#10712, opt_ways) · 3b233793
      thomie authored
      Please revert when #10712 is fixed.
      3b233793
    • thomie's avatar
      Testsuite: update expected output · e0b3ff0f
      thomie authored
      e0b3ff0f
    • Simon Peyton Jones's avatar
      Improve the error messages for class instance errors · 28ac9d31
      Simon Peyton Jones authored
      Summary: See Note [Displaying potential instances].
      
      Reviewers: austin
      
      Subscribers: KaneTW, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1176
      28ac9d31
    • spinda's avatar
      Expand declaration QQs first (#10047) · c8f623e3
      spinda authored
      Declaration QuasiQuoters do not cause a group split like $(...)
      splices, and are run and expanded before other declarations in
      the group.
      
      Resolves the lingering issue with #10047, and fixes broken tests
      qq007 and qq008.
      
      Test Plan: validate
      
      Reviewers: goldfire, austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: goldfire, simonpj, thomie, spinda
      
      Differential Revision: https://phabricator.haskell.org/D1199
      
      GHC Trac Issues: #10047
      c8f623e3
    • spinda's avatar
      Allow annotations though addTopDecls (#10486) · ba5554ec
      spinda authored
      addTopDecls restricts what declarations it can be used to add. Adding
      annotations via this method works fine with no special changes apart
      from adding AnnD to the declaration whitelist.
      
      Test Plan: validate
      
      Reviewers: austin, goldfire, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1201
      
      GHC Trac Issues: #10486
      ba5554ec
    • Matthew Pickering's avatar
      Add test for updating a record with existentially quantified fields. · ff9432f6
      Matthew Pickering authored
      Test Plan: ./validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1193
      ff9432f6
    • Eric Seidel's avatar
      Use IP based CallStack in error and undefined · 6740d70d
      Eric Seidel authored
      This patch modifies `error`, `undefined`, and `assertError` to use
      implicit call-stacks to provide better error messages to users.
      
      There are a few knock-on effects:
      
      - `GHC.Classes.IP` is now wired-in so it can be used in the wired-in
        types for `error` and `undefined`.
      
      - `TysPrim.tyVarList` has been replaced with a new function
        `TysPrim.mkTemplateTyVars`. `tyVarList` made it easy to introduce
        subtle bugs when you need tyvars of different kinds. The naive
      
        ```
        tv1 = head $ tyVarList kind1
        tv2 = head $ tyVarList kind2
        ```
      
        would result in `tv1` and `tv2` sharing a `Unique`, thus substitutions
        would be applied incorrectly, treating `tv1` and `tv2` as the same
        tyvar. `mkTemplateTyVars` avoids this pitfall by taking a list of kinds
        and producing a single tyvar of each kind.
      
      - The types `GHC.SrcLoc.SrcLoc` and `GHC.Stack.CallStack` now live in
        ghc-prim.
      
      - The type `GHC.Exception.ErrorCall` has a new constructor
        `ErrorCallWithLocation` that takes two `String`s instead of one, the
        2nd one being arbitrary metadata about the error (but usually the
        call-stack). A bi-directional pattern synonym `ErrorCall` continues to
        provide the old API.
      
      Updates Cabal, array, and haddock submodules.
      
      Reviewers: nh2, goldfire, simonpj, hvr, rwbarton, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, rodlogic, goldfire, maoe, simonmar, carter,
      liyang, bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D861
      
      GHC Trac Issues: #5273
      6740d70d
  14. 29 Aug, 2015 2 commits
    • Yuras's avatar
      Fix identifier parsing in hp2ps · 0c823af8
      Yuras authored
      Now identifiers can start with a package key, which is a hash, so they
      may also start with a digit. Identifiers always appear at the beginning
      of a line, and numbers never appear here, soit's safe to allow
      identifiers to start with a digit.
      
      Test Plan: `concprog002` passes under `threaded2_hT` way
      
      Reviewers: austin, bgamari, thomie
      
      Reviewed By: austin, bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1175
      
      GHC Trac Issues: #10661
      0c823af8
    • Ben Gamari's avatar
      Add testcase for #7411 · 15cb83d4
      Ben Gamari authored
      15cb83d4
  15. 21 Aug, 2015 1 commit
  16. 18 Aug, 2015 2 commits
    • Tamar Christina's avatar
      Fix rdynamic flag and test on Windows · b17ec567
      Tamar Christina authored
      The rdynamic tests and feature are marked broken on windows.
      This is because the flag used doesn't exist and the symbol lookup
      in the test did not account for platform differences in name mangling.
      
      This commit fixes the flag and tests for rdynamic on windows.
      
      Test Plan:
      make TEST="rdynamic"
      
      on both x86 and x86_64
      
      Reviewers: austin, thomie, bgamari
      
      Reviewed By: thomie, bgamari
      
      Subscribers: #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D1149
      
      GHC Trac Issues: #9381
      b17ec567
    • Michael Snoyman's avatar
      Transliterate unknown characters at output · 22aca536
      Michael Snoyman authored
      This avoids the compiler from crashing when, for example, a warning
      contains a non-Latin identifier and the LANG variable is set to C.
      Fixes #6037.
      
      Test Plan:
      Create a Haskell source file containing an identifier with non-Latin
      characters and no type signature. Compile with `LANG=C ghc -Wall
      foo.hs`, and it should fail. With this patch, it will succeed.
      
      Reviewers: austin, rwbarton, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1153
      
      GHC Trac Issues: #6037, #10762
      22aca536
  17. 15 Aug, 2015 1 commit
  18. 12 Aug, 2015 3 commits
    • Tamar Christina's avatar
      Upgrade GCC to 5.2.0 for Windows x86 and x86_64 · 7b211b4e
      Tamar Christina authored
      This patch does a few things
      
      - Moved GHC x86 to MinGW-w64 (Using Awson's patch)
      - Moves Both GHCs to MSYS2 toolchains
      - Completely removes the dependencies on the git tarball repo
        - Downloads only the required tarball for the architecture for
          which we are building
        - Downloads the perl tarball is missing as well
        - Fixed a few bugs in the linker to fix tests on Windows
      
      The links currently point to repo.msys2.org and GitHub, it might be
      more desirable to mirror them on
      http://downloads.haskell.org/~ghc/mingw/ as with the previous patch
      attempt.
      
      For more details on what the MSYS2 packages I include see #10726
      (Awson's comment). but it should contain all we need
      and no python or fortran, which makes the uncompressed tar a 1-2
      hundreds mb smaller.
      
      The `GCC 5.2.0` in the package supports `libgcc` as a shared library,
      this is a problem since
      when compiling with -shared the produced dll now has a dependency on
      `libgcc_s_sjlj-1.dll`.
      To solve this the flag `-static-libgcc` is now being used for all GCC
      calls on windows.
      
      Test Plan:
      ./validate was ran both on x86 and x86_64 windows and compared against
      the baseline.
      
      A few test were failing due to Ld no longer being noisy. These were
      updated.
      
      The changes to the configure script *should* be validated by the build
      bots for the other platforms before landing
      
      Reviewers: simonmar, awson, bgamari, austin, thomie
      
      Reviewed By: thomie
      
      Subscribers: #ghc_windows_task_force, thomie, awson
      
      Differential Revision: https://phabricator.haskell.org/D1123
      
      GHC Trac Issues: #10726, #9014, #9218, #10435
      7b211b4e
    • thomie's avatar
      Pretty: fix potential bad formatting of error message (#10735) · bcfae08c
      thomie authored
      This is a backport of a bug fix by Benedikt Huber for the same problem
      in the pretty library (#1337), from commit
      8d8866a8379c2fe8108ef034893c59e06d5e752f. The original explanation for
      the fix is attached below.
      
      Ticket #1776 originally reported an infinite loop when printing error
      message. This promptly got fixed in:
      
        commit 2d52ee06
        Author: simonpj@microsoft.com <unknown>
        Date:   Thu Mar 1 11:45:13 2007 +0000
      
            Do not go into an infinite loop when pretty-printer finds a
            negative indent (Trac #1176)
      
      SPJ reports in the ticket: "So infinite loop is fixed, but the bad
      formatting remains. I've added a test, tcfail177."
      
      tcfail177 however hasn't triggered the formatting problem for years (as
      Ian reported in c9e0e606).
      
      This patch updates the test to a version that at least still failed with
      ghc-7.0 (from #1776#comment:7).
      
      -------------------
      
      From https://mail.haskell.org/pipermail/libraries/2008-June/010013.html,
      by Benedikt Huber:
      
          Concerning ticket #1337, we have to change the formal specification of
          fill (it doesn't match the implementation):
      
          -- Current Specification:
          --   fill []  = empty
          --   fill [p] = p
          --   fill (p1:p2:ps) = oneLiner p1 <#> nest (length p1)
          --                                          (fill (oneLiner p2 : ps))
          --                     `union`
          --                      p1 $$ fill ps
      
          Problem 1: We want to `unnest' the second argument of (p1 $$ fill ps),
          but not the first one
      
          In the definition above we have e.g.
      
          > getSecondLayout $
          >   fillDef False [text "a", text "b", text "a"]
      
          >> text "ab"; nilabove; nest -1; text "a"; empty
          >> |ab|
          >> |.a|
      
          Problem 2: The overlapping $$ should only be used for those layouts of
          p1 which aren't one liners (otherwise violating the invariant "Left
          union arg has shorter first line").
      
          I suggest the following specification (i believe it almost matches the
          current implementation, modulo [fillNB: fix bug #1337] (see below):
      
          -- Revised Specification:
          --   fill g docs = fill' 0 docs
          --   gap g       = if g then 1 else 0
          --   fill' n []  = []
          --   fill' n [p] = [p]
          --   fill' n (p1:p2:ps) =
          --      oneLiner p1 <g> (fill' (n+length p1+gap g) (oneLiner p2 : ps))
          --        `union`
          --     (p1 $*$ nest (-n) (fill' g ps))
          --
          -- $*$ is defined for layouts (One-Layout Documents) as
          --
          -- layout1 $*$ layout2 | isOneLiner layout1 = layout1 $+$ layout2
          --                     | otherwise          = layout1 $$ layout2
      
          I've also implemented the specification in HughesPJQuickCheck.hs,
          and checked them against the patched pretty printer.
      
          Concerning Bug #1337:
          ~~~~~~~~~~~~~~~~~~~~~
      
          If the above formal specification is fine, it is easy to fix:
          elide the nests of (oneLiner p2) [see attached patch, record bug #1337].
      
          > PrettyPrint(0) $ ./Bug1337
          > ....ab
          > ...c
      
          The (long) explanation follows below.
      
          <snip/>
      
          ===========================================================
          Explanation of Bug #1337:
      
          Consider
      
          > fcat [ nest 1 $ text "a", nest 2 $ text "b", text "c"]
      
          --> expected: (nest 1; text "a"; text "b"; nest -3; "c")
          --> actual  : (nest 1; text "a"; text "b"; nest -5; "c")
      
          Reduction:
          === (nest 1; text a) <> (fill (-2) (p2:ps))
          ==>                     (nest 2 (text "b") $+$ text "c")
          ==>                     (nest 2 (text "b")) `nilabove`
                                  (nest (-3) (text "c"))
          ==> (nest 1; text a; text b; nest -5 c)
      
          The problem is that if we decide to layout (p1:p2:ps) as
      
          | p1 p2
          | ps
      
          (call it layout A), then we want to have
      
          > (p1 <> p2) $+$ ps.
      
          But following law <n6> this means that
      
          > fcat_A [p1:nest k p2:ps]
      
          is equivalent to
      
          > fcat_A [p1,p2,ps]
      
          so the nest of p2 has to be removed.
      
          This is somewhat similar to bug #667, but easier to fix
          from a semantic point of view:
          p1,p2 and ps are distinct layouts - we only have to preserve the
          individual layouts, and no combinations of them.
      bcfae08c
    • Herbert Valerio Riedel's avatar
      Bump template-haskell to new major version 2.11 · 8cce7e4b
      Herbert Valerio Riedel authored
      ...since we already have introduced backward compat breakage
      that breaks packages such as QuickCheck-2.8.1
      
      Differential Revision: https://phabricator.haskell.org/D1144
      8cce7e4b