1. 03 Jul, 2015 10 commits
    • thomie's avatar
      parser: Allow Lm (MODIFIER LETTER) category in identifiers · 6b01d3ce
      thomie authored
      Easy fix in the parser to stop regressions, due to Unicode 7.0 changing
      the classification of some prior code points.
      Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
      
      Test Plan: `tests/parser/should_compile/T10196.hs`
      
      Reviewers: hvr, austin, bgamari
      
      Reviewed By: austin, bgamari
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D969
      
      GHC Trac Issues: #10196
      6b01d3ce
    • Ryan Scott's avatar
      Generalize traceM, traceShowM (fixes #10023) · 39d83f23
      Ryan Scott authored
      This generalizes the type signatures of `traceM` and `traceShowM` to
      use `Applicative` rather than `Monad`.
      
      Reviewers: austin, ekmett, hvr, bgamari
      
      Reviewed By: ekmett, hvr, bgamari
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1029
      
      GHC Trac Issues: #10023
      39d83f23
    • rasen's avatar
      Add "since" column for LANGUAGE extensions in user guide · 8b55788c
      rasen authored
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1019
      
      GHC Trac Issues: #9665
      8b55788c
    • Matthew Pickering's avatar
      Remove redundant parser entry point · e4bf4bf0
      Matthew Pickering authored
      `parseFullStmt` and `parseStatement` exposed the same parser entry
      point.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: gibiansky, alanz, thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1014
      e4bf4bf0
    • Ben Gamari's avatar
      users_guide: Describe order-dependence of -f and -O flags · 6400c768
      Ben Gamari authored
      The behavior of the -f and -O options can be quite surprising.
      Document this fact. At some point this behavior should likely be changed.
      
      Test Plan: documentation only
      
      Reviewers: austin, trofi
      
      Reviewed By: austin, trofi
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1008
      
      GHC Trac Issues: #10560
      6400c768
    • Matthew Pickering's avatar
      Remove unnecessary OrdList from decl parser. · f07b7a87
      Matthew Pickering authored
      Each production produced a singleton list.
      
      Similar treatment is applied to the decl_cls parser.
      
      This changes the type of the parseDeclaration entry point to
      
      `parseDeclaration :: P (LHsDecl RdrName)`
      
      and
      
      `parseTypeSignature :: P (LHsDecl RdrName)`
      
      which is in line with the other parser entry points.
      
      This patch also updates the conflict commentary.  There were 4 reduce/reduce
      conflicts introduced by `ffc21506` which
      refactored tuple constraints.
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1007
      f07b7a87
    • thomasw's avatar
      Fix Trac #10519 · f8563838
      thomasw authored
      Look through nested foralls when checking the validity of a partial type
      signature. The combination of D836 and D613 prompts this change.
      
      Test Plan: The test T10519 must pass
      
      Reviewers: simonpj, alanz, austin
      
      Reviewed By: simonpj, alanz, austin
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D994
      
      GHC Trac Issues: #10519
      f8563838
    • Zejun Wu's avatar
      Enable using qualified field of constructor in GHCi · 1d6ead7d
      Zejun Wu authored
      The -fimplicit-import-qualified made it possible to uses qualifed names
      in GHCi without explicitly import the modules. But it didn't work for
      field of constructor, this patch fixed this issue.
      
      Test Plan:
      cd testsuite/tests/rename/ && make
      cd testsuite/tests/ghci/ && make
      
      Reviewers: austin, simonpj
      
      Reviewed By: austin, simonpj
      
      Subscribers: bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D900
      
      GHC Trac Issues: #10439
      1d6ead7d
    • Ben Gamari's avatar
      Use `+RTS -G1` for more stable residency measurements (#9675) · b5e1944e
      Ben Gamari authored
      Reviewers: ezyang, austin, thomie
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1006
      
      GHC Trac Issues: #10557
      b5e1944e
    • Peter Trommler's avatar
      Implement PowerPC 64-bit native code backend for Linux · d3c1dda6
      Peter Trommler authored
      Extend the PowerPC 32-bit native code generator for "64-bit
      PowerPC ELF Application Binary Interface Supplement 1.9" by
      Ian Lance Taylor and "Power Architecture 64-Bit ELF V2 ABI Specification --
      OpenPOWER ABI for Linux Supplement" by IBM.
      The latter ABI is mainly used on POWER7/7+ and POWER8
      Linux systems running in little-endian mode. The code generator
      supports both static and dynamic linking. PowerPC 64-bit
      code for ELF ABI 1.9 and 2 is mostly position independent
      anyway, and thus so is all the code emitted by the code
      generator. In other words, -fPIC does not make a difference.
      
      rts/stg/SMP.h support is implemented.
      
      Following the spirit of the introductory comment in
      PPC/CodeGen.hs, the rest of the code is a straightforward
      extension of the 32-bit implementation.
      
      Limitations:
      * Code is generated only in the medium code model, which
        is also gcc's default
      * Local symbols are not accessed directly, which seems to
        also be the case for 32-bit
      * LLVM does not work, but this does not work on 32-bit either
      * Must use the system runtime linker in GHCi, because the
        GHC linker for "static" object files (rts/Linker.c) for
        PPC 64-bit is not implemented. The system runtime
        (dynamic) linker works.
      * The handling of the system stack (register 1) is not ELF-
        compliant so stack traces break. Instead of allocating a new
        stack frame, spill code should use the "official" spill area
        in the current stack frame and deallocation code should restore
        the back chain
      * DWARF support is missing
      
      Fixes #9863
      
      Test Plan: validate (on powerpc, too)
      
      Reviewers: simonmar, trofi, erikd, austin
      
      Reviewed By: trofi
      
      Subscribers: bgamari, arnons1, kgardas, thomie
      
      Differential Revision: https://phabricator.haskell.org/D629
      
      GHC Trac Issues: #9863
      d3c1dda6
  2. 02 Jul, 2015 3 commits
  3. 30 Jun, 2015 5 commits
  4. 29 Jun, 2015 3 commits
  5. 28 Jun, 2015 2 commits
    • Ben Gamari's avatar
      Add -fcross-module-specialise flag · 302d9377
      Ben Gamari authored
      Summary:
      As of 7.10.1 we specialize INLINEABLE identifiers defined in other
      modules. This can expose issues (compiler bugs or otherwise) in some cases
      (e.g. Trac #10491) and therefore we now provide a way for the user to disable
      this optimization.
      
      Test Plan: Successfully compile Splice.hs from Trac #10491.
      
      Reviewers: simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D999
      
      GHC Trac Issues: #10491
      302d9377
    • Ben Gamari's avatar
      Add -fcross-module-specialise flag · 89834d6d
      Ben Gamari authored
      Summary:
      As of 7.10.1 we specialize INLINEABLE identifiers defined in other
      modules. This can expose issues (compiler bugs or otherwise) in some cases
      (e.g. Trac #10491) and therefore we now provide a way for the user to disable
      this optimization.
      
      Test Plan: Successfully compile Splice.hs from Trac #10491.
      
      Reviewers: simonpj, austin
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D999
      
      GHC Trac Issues: #10491
      89834d6d
  6. 27 Jun, 2015 1 commit
  7. 26 Jun, 2015 16 commits
    • Simon Peyton Jones's avatar
      Test Trac #10524 · 0e1e7987
      Simon Peyton Jones authored
      0e1e7987
    • Simon Peyton Jones's avatar
      Improve error message for Typeable k (T k) · ceb3c844
      Simon Peyton Jones authored
      GHC can't yest build a TypeRep for a type involving kind variables.
      (We await kinds = types for that.)  But the error message was terrible,
      as fixing #10524 reminded me.
      
      This improves it a lot.
      ceb3c844
    • Simon Peyton Jones's avatar
      Better tracing and tiny refactoring · a64a26f0
      Simon Peyton Jones authored
      a64a26f0
    • Simon Peyton Jones's avatar
      Make fvType ignore kinds · 8e347839
      Simon Peyton Jones authored
      TcValidity.fvTypes works in partnership with sizeTypes, and
      hence should ignore kinds in exactly the same way.  It wasn't
      doing so, which meant that validDerivPred said "No" when it
      should have said "Yes". That led to the bug reported in
      Trac #10524 comment:7.
      
      The error message is pretty terrible
        No instance for (Typeable T)
      but I'll fix that next
      8e347839
    • Simon Peyton Jones's avatar
      Kill off sizePred · 614ba3c5
      Simon Peyton Jones authored
      It really isn't needed, and life is simpler without
      614ba3c5
    • Simon Peyton Jones's avatar
      closeOverKinds *before* oclose in coverage check · 7c07cf16
      Simon Peyton Jones authored
      Combining functional dependencies with kind-polymorphism is
      devilishly tricky!  It's all documented in
          Note [Closing over kinds in coverage]
      
      Fixes Trac #10564
      7c07cf16
    • Simon Peyton Jones's avatar
      Improve CPR behavior for strict constructors · 0696fc6d
      Simon Peyton Jones authored
      When working on Trac #10482 I noticed that we could give constructor
      arguments the CPR property if they are use strictly.
      
      This is documented carefully in
          Note [CPR in a product case alternative]
      and also
          Note [Initial CPR for strict binders]
      
      There are a bunch of intersting examples in
          Note [CPR examples]
      which I have added to the test suite as T10482a.
      
      I also added a test for #10482 itself.
      0696fc6d
    • Simon Peyton Jones's avatar
      Small doc fixes · caf9d427
      Simon Peyton Jones authored
      caf9d427
    • Simon Peyton Jones's avatar
      Comments only · cbd9278c
      Simon Peyton Jones authored
      cbd9278c
    • thomie's avatar
      GHCi docs: layout rule is respected inside :{ :} · 7c8ffd3d
      thomie authored
      Summary:
      I don't know if or when this changed, but the documentation on :{ :}
      (multiline input) seems out of date. Layout rule works fine. I added a
      regression test.
      
      Reviewers: austin
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1013
      7c8ffd3d
    • Simon Marlow's avatar
      Fix deadlock (#10545) · 111ba4be
      Simon Marlow authored
      yieldCapability() was not prepared to be called by a Task that is not
      either a worker or a bound Task.  This could happen if we ended up in
      yieldCapability via this call stack:
      
      performGC()
      scheduleDoGC()
      requestSync()
      yieldCapability()
      
      and there were a few other ways this could happen via requestSync.
      The fix is to handle this case in yieldCapability(): when the Task is
      not a worker or a bound Task, we put it on the returning_workers
      queue, where it will be woken up again.
      
      Summary of changes:
      
      * `yieldCapability`: factored out subroutine waitForWorkerCapability`
      * `waitForReturnCapability` renamed to `waitForCapability`, and
        factored out subroutine `waitForReturnCapability`
      * `releaseCapabilityAndQueue` worker renamed to `enqueueWorker`, does
        not take a lock and no longer tests if `!isBoundTask()`
      * `yieldCapability` adjusted for refactorings, only change in behavior
        is when it is not a worker or bound task.
      
      Test Plan:
      * new test concurrent/should_run/performGC
      * validate
      
      Reviewers: niteria, austin, ezyang, bgamari
      
      Subscribers: thomie, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D997
      
      GHC Trac Issues: #10545
      111ba4be
    • Simon Marlow's avatar
      Fix for crash in setnumcapabilities001 · be0ce871
      Simon Marlow authored
      getNewNursery() was unconditionally incrementing next_nursery, which
      is normally fine but it broke an assumption in
      storageAddCapabilities().  This manifested as an occasional crash in
      the setnumcapabilities001 test.
      be0ce871
    • Simon Peyton Jones's avatar
      Tiny refactor plus comments · 0aaea5b8
      Simon Peyton Jones authored
      0aaea5b8
    • Simon Peyton Jones's avatar
      Error message wibbles from out-of-scope changes · b98ff25f
      Simon Peyton Jones authored
      The patch "Treat out-of-scope variables as holes" makes
      lots of error messages change a bit. This patch has all
      the change.
      b98ff25f
    • Simon Peyton Jones's avatar
      Treat out-of-scope variables as holes · fb7b6922
      Simon Peyton Jones authored
      This patch implements the idea in Trac #10569.
      
      * An out-of-scope variable is treated as a typed expression
        hole.
      
      * That is, we don't report it in the type checker, not the
        renamer, and we when we do report it, we give its type.
      
      * Moreover, we can defer the error to runtime with
        -fdefer-typed-holes
      
      In implementation terms:
      
      * The renamer turns an unbound variable into a HsUnboundVar
      
      * The type checker emits a Hole constraint for a
        HsUnboundVar, and turns it back into a HsVar
      
      It was a bit painful to implement because a whole raft of
      error messages change slightly.  But there was absolutely
      nothing hard in principle.
      
      Holes are reported with a bunch of possibly-useful context,
      notably the "relevant bindings".  I found that this was
      distracting clutter in the very common case of a mis-typed
      variable that is only accidentally not in scope, so I've
      arranged to print the context information only for true holes,
      that is ones starting with an underscore.
      
      Unbound data constructors use in patterns, like
        f (D x) = x
      are still reportd by the renamer, and abort compilation
      before type checking.
      fb7b6922
    • Simon Peyton Jones's avatar
      Get rid of irrelevant impredicative polymoprhism · 95fc6d59
      Simon Peyton Jones authored
      These tests aren't about impredicativity
      95fc6d59