1. 21 Dec, 2015 1 commit
    • dolio's avatar
      Modify IsString String instance (fixes #10814) · b225b234
      dolio authored
      The new instance resolves to `s ~ [Char]` as soon as we know that `s ~
      [a]`, to avoid certain functions (like (++)) causing a situation where
      `a` is ambiguous and (currently) unable to be defaulted.
      Reviewers: #core_libraries_committee, hvr, austin, bgamari
      Reviewed By: hvr, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1572
      GHC Trac Issues: #10814
  2. 20 Dec, 2015 3 commits
  3. 19 Dec, 2015 1 commit
  4. 18 Dec, 2015 6 commits
  5. 17 Dec, 2015 21 commits
    • Herbert Valerio Riedel's avatar
      Update containers submodule to v0.5.7.0 release · c5c72aaf
      Herbert Valerio Riedel authored
      This is the designated release to go with GHC 8.0.1
      This release doesn't need any warning-suppression flags anymore, so
      remove those from mk/warnings.mk
      /cc @foxik
    • Ryan Scott's avatar
      Move Data.Functor.(Classes,Compose,Product,Sum) into base · e0e03d5b
      Ryan Scott authored
      These modules were previously provided by the `transformers`
      package. Hence the submodule update.
      This patch was originally contributed by M Farkas-Dyck and
      subsequently taken over and completed by Ryan.
      The original proposal discussion can be found at
      This addresses #11135
      Differential Revision: https://phabricator.haskell.org/D1543
    • thomie's avatar
      Testsuite: mark frontend01 conditionally expect_broken on #10301 · bc436f9e
      thomie authored
      This should fix validate on Travis.
    • thomie's avatar
      Suppress warnings when compiling primitive and random · f1fa3839
      thomie authored
      And fix a redundant constraint warning in a test that requires
    • thomie's avatar
      Testsuite: allow spaces in TEST_HC passed in by the user · 272e1cc8
      thomie authored
      Don't use the GNU make function 'realpath' (reverting e66a81c6),
      because it doesn't handle spaces in paths. Instead, use 'cygpath' to
      convert Windows style paths (e.g. C:/foo/) to mingw style paths (e.g.
      c/foo/), and then call 'which'.
       * make TEST_HC=ghc
       * make TEST_HC=/d/home/thomie/ghc-validate/bindisttest/install\ \ \ dir/bin/ghc
       * make TEST_HC=D:/home/thomie/ghc-validate/bindisttest/install\ \ \ dir/bin/ghc
      Reviewed by: Phyx
      Differential Revision: https://phabricator.haskell.org/D1431
    • eir@cis.upenn.edu's avatar
      Fix #11230. · 1722fa10
      eir@cis.upenn.edu authored
      Previously, we were optimizing away all case expressions over
      coercions with dead binders. But sometimes we want to force
      the coercion expression. Like when it contains an error.
      Test case: typecheck/should_run/T11230
    • eir@cis.upenn.edu's avatar
      Fix tcTyClTyVars to handle SigTvs · ae86eb9f
      eir@cis.upenn.edu authored
      Previously, tcTyClTyVars required that the names of the LHsQTyVars
      matched up exactly with the names of the kind of the given TyCon.
      It now does a bit of matching up when necessary to relax this
      This commit enables a few tests that had previously been disabled.
      The shortcoming this addresses is discussed in #11203, but that
      ticket is not directly addressed here.
      Test case: polykinds/SigTvKinds, perf/compiler/T9872d
    • thomie's avatar
      Testsuite: #10712 is fixed · a2f04a26
      thomie authored
      Verified by running:
        make TEST='exceptionsrun001 T3279 conc012 conc014' slowtest
    • Ben Gamari's avatar
      Disable recomp015 on ARM · e2e24f28
      Ben Gamari authored
      Due to differences in assembly syntax. See #11022.
    • Ben Gamari's avatar
      T9961 allocations crept further upwards · aee58e16
      Ben Gamari authored
    • Simon Peyton Jones's avatar
      Remove unused T10524.stderr · e32c2e1f
      Simon Peyton Jones authored
    • Eugene Akentyev's avatar
      Add -fprint-typechecker-elaboration flag (fixes #10662) · d3dac4e3
      Eugene Akentyev authored
      Reviewers: thomie, austin, bgamari
      Reviewed By: thomie, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1625
      GHC Trac Issues: #10662
    • Adam Gundry's avatar
      Reify DuplicateRecordFields by label, rather than by selector · 4b161c93
      Adam Gundry authored
      See `Note [Reifying field labels]` in `TcSplice`. This makes
      typical uses of TH work better with `DuplicateRecordFields`.
      If `reify` is called on the `Name` of a field label produced by
      the output of a previous `reify`, and there are multiple  fields
      with that label defined in the same module, it may fail with
      an ambiguity error.
      Test Plan:
      Added tests, and manually tested that this makes
      Aeson's `deriveJSON` avoid the `$sel:` prefixes.
      Reviewers: simonpj, goldfire, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1586
      GHC Trac Issues: #11103
    • eir@cis.upenn.edu's avatar
      Fix #11232. · cab13162
      eir@cis.upenn.edu authored
      I somehow forgot to propagate roles into UnivCos. Very
      simple fix, happily.
      Test Plan: simplCore/should_compile/T11232
      Reviewers: bgamari, austin, simonpj
      Reviewed By: simonpj
      Subscribers: simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D1645
      GHC Trac Issues: #11232
    • quchen's avatar
      Conditionally show plural "s" in warnings · 4f870f84
      quchen authored
      Redundant constraints and defaulting warnings had "constraint(s)" in
      their messages; the "s" is now conditional based on the number of things
      warned about.
      Reviewers: hvr, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1647
    • Ben Gamari's avatar
      TcTypeable: Don't use bogus fingerprints when suppress-uniques is enabled · 786d528e
      Ben Gamari authored
      Previously the Typeable implementation would intentionally create TyCon
      representations with bogus fingerprints to avoid fingerprints (which may
      change often) from leaking into test output. As pointed out by Richard
      in #10376 this is very bad as simply enabling a debug flag,
      `-dsuppress-uniques`, completely breaks the soundness of `Typeable`!
      This patch removes this behavior and replaces it with logic in the
      testsuite driver to filter out spurious changes due to Typeable
      Test Plan: Validate
      Reviewers: austin, simonpj, goldfire
      Reviewed By: goldfire
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1629
      GHC Trac Issues: #10376
    • Ben Gamari's avatar
      testsuite: Add missing LiteralsTest2.hs · b20a65d5
      Ben Gamari authored
    • Ben Gamari's avatar
      Bump haddock expected performance numbers · acd447e6
      Ben Gamari authored
      This was a pretty brutal upgrade, with >100% increase in allocations
      while processing `base`. Ugh.
    • Simon Marlow's avatar
      Fix tests when run in parallel · dd3837ab
      Simon Marlow authored
    • Simon Marlow's avatar
      accept output · a6d664cf
      Simon Marlow authored
    • Simon Marlow's avatar
      Remote GHCi, -fexternal-interpreter · 4905b83a
      Simon Marlow authored
      (Apologies for the size of this patch, I couldn't make a smaller one
      that was validate-clean and also made sense independently)
      (Some of this code is derived from GHCJS.)
      This commit adds support for running interpreted code (for GHCi and
      TemplateHaskell) in a separate process.  The functionality is
      experimental, so for now it is off by default and enabled by the flag
      Reaosns we want this:
      * compiling Template Haskell code with -prof does not require
        building the code without -prof first
      * when GHC itself is profiled, it can interpret unprofiled code, and
        the same applies to dynamic linking.  We would no longer need to
        force -dynamic-too with TemplateHaskell, and we can load ordinary
        objects into a dynamically-linked GHCi (and vice versa).
      * An unprofiled GHCi can load and run profiled code, which means it
        can use the stack-trace functionality provided by profiling without
        taking the performance hit on the compiler that profiling would
      Amongst other things; see
      https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
      Notes on the implementation are in Note [Remote GHCi] in the new
      module compiler/ghci/GHCi.hs.  It probably needs more documenting,
      feel free to suggest things I could elaborate on.
      Things that are not currently implemented for -fexternal-interpreter:
      * The GHCi debugger
      * :set prog, :set args in GHCi
      * `recover` in Template Haskell
      * Redirecting stdin/stdout for the external process
      These are all doable, I just wanted to get to a working validate-clean
      patch first.
      I also haven't done any benchmarking yet.  I expect there to be slight hit
      to link times for byte code and some penalty due to having to
      serialize/deserialize TH syntax, but I don't expect it to be a serious
      problem.  There's also lots of low-hanging fruit in the byte code
      generator/linker that we could exploit to speed things up.
      Test Plan:
      * validate
      * I've run parts of the test suite with
      EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
      There are a few failures due to the things not currently implemented
      (see above).
      Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1562
  6. 16 Dec, 2015 3 commits
  7. 15 Dec, 2015 5 commits
    • Ben Gamari's avatar
      Expose enabled language extensions to TH · c1e25536
      Ben Gamari authored
      This exposes `template-haskell` functions for querying the language
      extensions which are enabled when compiling a module,
      - an `isExtEnabled` function to check whether an extension is enabled
      - an `extsEnabled` function to obtain a full list of enabled extensions
      To avoid code duplication this adds a `GHC.LanguageExtensions` module to
      `ghc-boot` and moves `DynFlags.ExtensionFlag` into it. A happy
      consequence of this is that the ungainly `DynFlags` lost around 500
      lines. Moreover, flags corresponding to language extensions are now
      clearly distinguished from other flags due to the `LangExt.*` prefix.
      Updates haddock submodule.
      This fixes #10820.
      Test Plan: validate
      Reviewers: austin, spinda, hvr, goldfire, alanz
      Reviewed By: goldfire
      Subscribers: mpickering, RyanGlScott, hvr, simonpj, thomie
      Differential Revision: https://phabricator.haskell.org/D1200
      GHC Trac Issues: #10820
    • Ben Gamari's avatar
      primops: Mark actions evaluated by `catch*` as lazy · 28638dfe
      Ben Gamari authored
      There is something very peculiar about the `catch` family of operations
      with respect to strictness analysis: they turn divergence into
      non-divergence. For this reason, it isn't safe to mark them as strict in
      the expression whose exceptions they are catching. The reason is this:
          let r = \st -> raiseIO# blah st
          in catch (\st -> ...(r st)..) handler st
      If we give the first argument of catch a strict signature, we'll get a
      demand 'C(S)' for 'r'; that is, 'r' is definitely called with one
      argument, which indeed it is. The trouble comes when we feed 'C(S)' into
      'r's RHS as the demand of the body as this will lead us to conclude that
      the whole 'let' will diverge; clearly this isn't right.
      This is essentially the problem in #10712, which arose when
      7c0fff41 marked the `catch*` primops as
      being strict in the thing to be evaluated. Here I've partially reverted
      this commit, again marking the first argument of these primops as lazy.
      Fixes #10712.
      Test Plan: Validate checking `exceptionsrun001`
      Reviewers: simonpj, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1616
      GHC Trac Issues: #10712, #11222
    • Ben Gamari's avatar
      Add testcase for #11224 · a701694b
      Ben Gamari authored
      Test Plan: Validate
      Reviewers: austin, mpickering
      Reviewed By: mpickering
      Subscribers: mpickering, thomie
      Differential Revision: https://phabricator.haskell.org/D1622
      GHC Trac Issues: #11224
    • Ben Gamari's avatar
      Narrow scope of special-case for unqualified printing of names in core libraries · e2c91738
      Ben Gamari authored
      Commit 547c5971 modifies the
      pretty-printer to render names from a set of core packages (`base`,
      `ghc-prim`, `template-haskell`) as unqualified. The idea here was that
      many of these names typically are not in scope but are well-known by the
      user and therefore qualification merely introduces noise.
      This, however, is a very large hammer and potentially breaks any
      consumer who relies on parsing GHC output (hence #11208). This commit
      partially reverts this change, now only printing `Constraint` (which
      appears quite often in errors) as unqualified.
      Fixes #11208.
      Updates tests in `array` submodule.
      Test Plan: validate
      Reviewers: hvr, thomie, austin
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D1619
      GHC Trac Issues: #11208
    • Simon Peyton Jones's avatar
      Allow recursive (undecidable) superclasses · 6eabb6dd
      Simon Peyton Jones authored
      This patch fulfils the request in Trac #11067, #10318, and #10592,
      by lifting the conservative restrictions on superclass constraints.
      These restrictions are there (and have been since Haskell was born) to
      ensure that the transitive superclasses of a class constraint is a finite
      set.  However (a) this restriction is conservative, and can be annoying
      when there really is no recursion, and (b) sometimes genuinely recursive
      superclasses are useful (see the tickets).
      Dimitrios and I worked out that there is actually a relatively simple way
      to do the job. It’s described in some detail in
         Note [The superclass story] in TcCanonical
         Note [Expanding superclasses] in TcType
      In brief, the idea is to expand superclasses only finitely, but to
      iterate (using a loop that already existed) if there are more
      superclasses to explore.
      Other small things
      - I improved grouping of error messages a bit in TcErrors
      - I re-centred the haddock.compiler test, which was at 9.8%
        above the norm, and which this patch pushed slightly over