1. 01 Feb, 2016 6 commits
    • Eric Seidel's avatar
      Hide the CallStack implicit parameter · 94048f9f
      Eric Seidel authored
      The implicit parameter isn't actually very relevant to the CallStack
      machinery, so we hide the implementation details behind a constraint
      alias
      
      ```
      type HasCallStack = (?callStack :: CallStack)
      ```
      
      This has a few benefits:
      
      1. No need to enable `ImplicitParams` in user code.
      2. No need to remember the `?callStack` naming convention.
      3. Gives us the option to change the implementation details in the
      future with less user-land breakage.
      
      The revised `CallStack` API is exported from `GHC.Stack` and makes no
      mention of the implicit parameter.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, austin, hvr, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1818
      94048f9f
    • Edward Z. Yang's avatar
      Simplify ghc-boot database representation with new type class. · 0d601657
      Edward Z. Yang authored
      
      
      Previously, we had an 'OriginalModule' type in ghc-boot which
      was basically identical to 'Module', and we had to do a bit of
      gyrating to get it converted into the right form.  This commit
      introduces a new typeclass, 'DbModuleRep' which represents types
      which we know how to serialize to and from the (now renamed) 'DbModule'
      type.
      
      The upshot is that we can just store 'Module's DIRECTLY in
      the 'InstalledPackageInfo', no conversion needed.
      
      I took the opportunity to clean up ghc-pkg to make its use of
      the 'BinaryStringRep' classes more type safe.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1811
      0d601657
    • niteria's avatar
      Suppress substitution assertions to fix tests · e5a0a890
      niteria authored
      This is one place that I've missed with D1862.
      This doesn't fix the underlying problem and I prefer to suppress it
      now and fix it later as this is a part of a larger effort (#11371)
      to fix an old bug with `substTy` called with invalid `in_scope` sets.
      
      Test Plan: `make test TEST="hClose002 hClose003 hDuplicateTo001"
      
      Reviewers: thomie, austin, bgamari, trofi
      
      Reviewed By: trofi
      
      Differential Revision: https://phabricator.haskell.org/D1872
      
      GHC Trac Issues: #11371
      e5a0a890
    • Ryan Scott's avatar
      Missing @since annotations in GHC.Generics · a883c1b7
      Ryan Scott authored
      [ci skip]
      a883c1b7
    • Ryan Scott's avatar
      Minor doc fixes to GHC.Generics · f8e2b7e3
      Ryan Scott authored
      This adds @since annotations and fixes a couple of Haddock formatting
      errors.
      f8e2b7e3
    • rwbarton's avatar
      When encountering a duplicate symbol, show source of the first symbol · 34519f08
      rwbarton authored
      Test Plan: Used this to track down an issue I was having.
      
      Reviewers: simonmar, austin, erikd, bgamari
      
      Reviewed By: erikd, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1863
      34519f08
  2. 31 Jan, 2016 5 commits
  3. 30 Jan, 2016 3 commits
  4. 29 Jan, 2016 5 commits
  5. 28 Jan, 2016 1 commit
    • niteria's avatar
      Use the in_scope set in lint_app · 63700a19
      niteria authored
      This makes the call to `substTy` satisfy the invariant from
      Note [The substitution invariant] in TyCoRep.
      
      Test Plan: ./validate --slow
      
      Reviewers: goldfire, austin, bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1861
      
      GHC Trac Issues: #11371
      63700a19
  6. 27 Jan, 2016 19 commits
    • Simon Marlow's avatar
      fix validate breakage · 0d5ddad9
      Simon Marlow authored
      (Travis said it was OK!)
      0d5ddad9
    • Simon Marlow's avatar
      Update profiling test output · 71b1183d
      Simon Marlow authored
      There were a couple of broken profiling tests.
      71b1183d
    • Simon Marlow's avatar
      Remote GHCi: create cost centre stacks in batches · a496f82d
      Simon Marlow authored
      Towards optimising the binary serialisation that
      -fexternal-interpreter does, this saves quite a bit of time when using
      -fexternal-interpreter with -prof.
      a496f82d
    • Simon Marlow's avatar
      Fix cost-centre-stack bug when creating new PAP (#5654) · 85daac59
      Simon Marlow authored
      See comment in `AutoApply.h`.  This partly fixes #5654.  New test
      added, and renamed the old test to match the ticket number.
      85daac59
    • niteria's avatar
      Rename "open" subst functions · 5dcae88b
      niteria authored
      This is the renaming that @simonpj requested:
      ```
      · zipOpenTCvSubst  -> zipTvSubst   (It only deals with tyvars)
      
      · zipOpenTCvSubstCoVars -> zipCvSubst   (it only deals with
      covars)
      
      · zipOpenTCvSubstBinders ->  zipTyBinderSubst  (it only deals
      with TyBinders, not covars)
      ```
      plus the `mk` variant.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, goldfire, austin, bgamari
      
      Subscribers: thomie, simonpj
      
      Differential Revision: https://phabricator.haskell.org/D1853
      
      GHC Trac Issues: #11371
      5dcae88b
    • eir@cis.upenn.edu's avatar
      Refactor the typechecker to use ExpTypes. · 00cbbab3
      eir@cis.upenn.edu authored
      The idea here is described in [wiki:Typechecker]. Briefly,
      this refactor keeps solid track of "synthesis" mode vs
      "checking" in GHC's bidirectional type-checking algorithm.
      When in synthesis mode, the expected type is just an IORef
      to write to.
      
      In addition, this patch does a significant reworking of
      RebindableSyntax, allowing much more freedom in the types
      of the rebindable operators. For example, we can now have
      `negate :: Int -> Bool` and
      `(>>=) :: m a -> (forall x. a x -> m b) -> m b`. The magic
      is in tcSyntaxOp.
      
      This addresses tickets #11397, #11452, and #11458.
      
      Tests:
        typecheck/should_compile/{RebindHR,RebindNegate,T11397,T11458}
        th/T11452
      00cbbab3
    • eir@cis.upenn.edu's avatar
      Fix some substitution InScopeSets · 2899aa58
      eir@cis.upenn.edu authored
      This is relevant to #11371.
      2899aa58
    • Ömer Sinan Ağacan's avatar
      s/unLifted/unlifted for consistency · 4faa1a63
      Ömer Sinan Ağacan authored
      This was causing trouble as we had to remember when to use "unLifted"
      and when to use "unlifted".
      
      "unlifted" is used instead of "unLifted" as it's a single word.
      
      Reviewers: austin, hvr, goldfire, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1852
      4faa1a63
    • Ben Gamari's avatar
      Document -fllvm-fill-undef-with-garbage · 45c6fbc5
      Ben Gamari authored
      45c6fbc5
    • rwbarton's avatar
      Test for undef bugs in the LLVM backend when validating · d50609e8
      rwbarton authored
      In an attempt to catch bugs involving using undef values, replace
      undef literals by values likely to cause crashes or test failures.
      We do this only when validating since it is a deoptimization.
      
      This depends on D1857 to catch such bugs in the RTS (such as #11487).
      
      Test Plan:
      Did a build with
      ```
      BuildFlavour = quick-llvm
      SRC_HC_OPTS_STAGE1 = -fllvm-fill-undef-with-garbage
      ```
      The build crashed when running ghc-stage2, as expected.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1858
      d50609e8
    • rwbarton's avatar
      Use stage1 build variables when building the RTS · 0d92d9cb
      rwbarton authored
      The fourth argument of distdir-way-opts was missing. So, for example,
      SRC_HC_OPTS_STAGE1 was not used when building the RTS.
      
      Test Plan: validate --slow
      
      Reviewers: austin, bgamari, thomie
      
      Reviewed By: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1857
      0d92d9cb
    • olsner's avatar
      Restore original alignment for info tables · 0dc7b36c
      olsner authored
      This was broken in 4a32bf92, meaning
      that info tables and subsequent code are no longer guaranteed to have
      the recommended alignment.  Split up the section header and section
      alignment printers, and print an appropriate alignment directive before
      each info table.
      
      Fixes Trac #11486
      
      Reviewers: austin, bgamari, rwbarton
      
      Reviewed By: bgamari, rwbarton
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1847
      
      GHC Trac Issues: #11486
      0dc7b36c
    • Ben Gamari's avatar
      rts/Timer: Actually fix #9105 · 1c6130d9
      Ben Gamari authored
      jberthold astutely pointed out that the previous fix (D1822) could not
      have possibly fixed the issue as the patch would only have had any
      effect if !PROFILING.
      
      Test Plan: Check for reduced CPU usage when compiled with `-prof` but
      without `+RTS -p`
      
      Reviewers: simonmar, austin, jberthold
      
      Reviewed By: simonmar, jberthold
      
      Subscribers: simonmar, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1844
      
      GHC Trac Issues: #9105
      1c6130d9
    • triple's avatar
      ghci: fix trac issue #11481 · 1f6d1422
      triple authored
      Test Plan: validate
      
      Reviewers: thomie, austin, bgamari
      
      Reviewed By: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1833
      
      GHC Trac Issues: #11481
      1f6d1422
    • Gabor Greif's avatar
      Typos in comments · 448ea978
      Gabor Greif authored
      448ea978
    • niteria's avatar
      Fix a typo in the note name in comments · 45fd83bb
      niteria authored
      This is `subsititution` to `substitution`, plus one instance of
      the note that I missed.
      
      Test Plan: docufix
      
      Reviewers: simonpj, bgamari, austin, goldfire
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1856
      
      GHC Trac Issues: #11371
      45fd83bb
    • Tamar Christina's avatar
      Enable RemoteGHCi on Windows · 44a5d51a
      Tamar Christina authored
      Makes the needed changes to make RemoteGHCi work on Windows.
      The approach passes OS Handles areound instead of the Posix Fd
      as on Linux.
      
      The reason is that I could not find any real documentation about
      the behaviour of Windows w.r.t inheritance and Posix FDs.
      
      The implementation with Fd did not seem to be able to find the Fd
      in the child process. Instead I'm using the much better documented
      approach of passing inheriting handles.
      
      This requires a small modification to the `process` library.
      https://github.com/haskell/process/pull/52
      
      Test Plan: ./validate On Windows x86_64
      
      Reviewers: thomie, erikd, bgamari, simonmar, austin, hvr
      
      Reviewed By: simonmar
      
      Subscribers: #ghc_windows_task_force
      
      Differential Revision: https://phabricator.haskell.org/D1836
      
      GHC Trac Issues: #11100
      44a5d51a
    • thomie's avatar
      e2bdf03a
    • thomie's avatar
      Testsuite: fixup req_profiling tests (#11496) · eeb67c9b
      thomie authored
      * T2552 (#10037) is failng for all threaded opt_ways, not for WAY=prof.
      * TH_spliceE5_prof (#11495) is failing when ghc_dynamic
      * Rename ghci_dynamic to ghc_dynamic. It's the same thing.
      eeb67c9b
  7. 26 Jan, 2016 1 commit
    • niteria's avatar
      Construct in_scope set in mkTopTCvSubst · 144ddb41
      niteria authored
      The pre-condition on `mkTopTCvSubst` turned out to be wrong and
      not satisfied by any of the callers. I've fixed it, so that it
      constructs the in_scope set from the range of the substitution.
      `mkTopTCvSubst` was also unnecessarily general it is never called
      with `CoVars`, so I changed the type signature and added an assertion.
      
      Test Plan: ./validate --slow
      
      Reviewers: goldfire, simonpj, bgamari, austin
      
      Reviewed By: simonpj
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1801
      
      GHC Trac Issues: #11371
      144ddb41