1. 08 Oct, 2019 2 commits
  2. 23 Sep, 2019 1 commit
  3. 13 Jun, 2019 1 commit
    • Ben Gamari's avatar
      users-guide: Fix a few markup issues · 70b5eefe
      Ben Gamari authored
      Strangely these were only causing the build to fail in the aarch64-linux
      job, despite Sphinx throwing errors in all jobs I checked.
      
      Also changes some `#ifdef`s to `#if defined` to satisfy the linter.
      70b5eefe
  4. 01 Jun, 2019 1 commit
  5. 20 Mar, 2019 1 commit
    • Takenobu Tani's avatar
      users-guide: Update Wiki URLs to point to GitLab · 89a201e8
      Takenobu Tani authored
      The user's guide uses the `ghc-wiki` macro, and substitution rules
      are complicated. So I manually edited `.rst` files without sed.
      
      I changed `Commentary/Latedmd` only to a different page.
      It is more appropriate as an example.
      
      [ci skip]
      89a201e8
  6. 29 Aug, 2018 1 commit
    • David Feuer's avatar
      Finish stable split · f48e276a
      David Feuer authored
      Long ago, the stable name table and stable pointer tables were one.
      Now, they are separate, and have significantly different
      implementations. I believe the time has come to finish the split
      that began in #7674.
      
      * Divide `rts/Stable` into `rts/StableName` and `rts/StablePtr`.
      
      * Give each table its own mutex.
      
      * Add FFI functions `hs_lock_stable_ptr_table` and
      `hs_unlock_stable_ptr_table` and document them.
        These are intended to replace the previously undocumented
      `hs_lock_stable_tables` and `hs_lock_stable_tables`,
        which are now documented as deprecated synonyms.
      
      * Make `eqStableName#` use pointer equality instead of unnecessarily
      comparing stable name table indices.
      
      Reviewers: simonmar, bgamari, erikd
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15555
      
      Differential Revision: https://phabricator.haskell.org/D5084
      f48e276a
  7. 14 May, 2018 1 commit
    • David Feuer's avatar
      Clarify what the FFI spec says · 48dee7c9
      David Feuer authored
      Section 10.1.1 claimed that
      
      > The FFI addendum stipulates that an implementation is free to
      implement an unsafe call by performing a safe call ...
      
      Reading through the FFI addendum (and the Haskell 2010 Report, which
      integrates it), I see no such stipulation. I think this explains the
      situation a bit better.
      
      [ci skip]
      
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, carter
      
      Differential Revision: https://phabricator.haskell.org/D4656
      48dee7c9
  8. 15 Nov, 2017 1 commit
  9. 25 Oct, 2017 1 commit
    • Joachim Breitner's avatar
      Make language extensions their own category in the documentation · 61f1b46e
      Joachim Breitner authored
      I.e. instead of
      
          .. ghc-flag:: -XUnboxedTuples
              :shortdesc: Enable the use of unboxed tuple syntax.
              :type: dynamic
              :reverse: -XNoUnboxedTuples
              :category:
      
      one simply writes
      
          .. extension:: UnboxedTuples
              :shortdesc: Enable the use of unboxed tuple syntax.
      
      This allows language extensions to be referenced as
      
          If :extension:`UnboxedTuples` is enabled, then...
      
      This directive still creates the entries for the `-XUnboxedTuples` flag,
      so in particular,
      
          Set :ghc-flag:`-XUnboxedTuples` if you have to.
      
      still works, and lists of flags in general (e.g. for the manpage)
      include these.
      
      I also removed lots of links from the shortdesc of the extensions, when
      this link simply points to the section where the extension is defined.
      
      I removed the list of `-X` flags from the flag reference table, but added a
      table of extension under “10.1. Language options”
      
      Lots of text in the manual now refers to “extension `Foo`” rather than
      “flag `-XFoo`”.
      
      I consider `-XFoo` a historic artifact that stems from when language
      extensions were really just flags. These days, the use of `-XFoo` is
      (IMHO) deprecated: You should be using `LANGUAGE Foo`, or maybe the
      appropriate field in a `.cabal` file. See 9278994a which did this change
      to error messages already.
      
      Differential Revision: https://phabricator.haskell.org/D4112
      61f1b46e
  10. 19 Aug, 2017 1 commit
    • patrickdoc's avatar
      users_guide: Convert mkUserGuidePart generation to a Sphinx extension · cf8ab1ce
      patrickdoc authored
      This removes all dependencies the users guide had on `mkUserGuidePart`.
      The generation of the flag reference table and the various pieces of the
      man page is now entirely contained within the Spinx extension
      `flags.py`. You can see the man page generation on the orphan page
      https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/ghc.html
      
      The extension works by collecting all of the meta-data attached to the
      `ghc-flag` directives and then formatting and displaying it at
      `flag-print` directives. There is a single printing directive that can
      be customized with two options, what format to display (table, list, or
      block of flags) and an optional category to limit the output to
      (verbosity, warnings, codegen, etc.).
      
      New display formats can be added by creating a function
      `generate_flag_xxx` (where `xxx` is a description of the format) which
      takes a list of flags and a category and returns a new `xxx`. Then just
      add a reference in the dispatch table `handlers`. That display can now
      be run by passing `:type: xxx` to the `flag-print` directive.
      
      `flags.py` contains two maps of settings that can be adjusted. The first
      is a canonical list of flag categories, and the second sets default
      categories for files.
      
      The only functionality that Sphinx could not replace was the
      `what_glasgow_exts_does.gen.rst` file. `mkUserGuidePart` actually just
      reads the list of flags from `compiler/main/DynFlags.hs` which Sphinx
      cannot do. As the flag is deprecated, I added the list as a static file
      which can be updated manually.
      
      Additionally, this patch updates every single documented flag with the
      data from `mkUserGuidePart` to generate the reference table.
      
      Fixes #11654 and, incidentally, #12155.
      
      Reviewers: austin, bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #11654, #12155
      
      Differential Revision: https://phabricator.haskell.org/D3839
      cf8ab1ce
  11. 27 Jul, 2017 1 commit
    • Andreas Klebinger's avatar
      Initialize hs_init with UTF8 encoded arguments on Windows. · 7af0b906
      Andreas Klebinger authored
      Summary:
      Get utf8 encoded arguments before we call hs_init and use them
      instead of ignoring hs_init arguments. This reduces differing
      behaviour of the RTS between windows and linux and simplifies
      the code involved.
      
      A few testcases were changed to expect the same result on windows
      as on linux after the changes.
      
      This fixes #13940.
      
      Test Plan: ./validate
      
      Reviewers: austin, hvr, bgamari, erikd, simonmar, Phyx
      
      Subscribers: Phyx, rwbarton, thomie
      
      GHC Trac Issues: #13940
      
      Differential Revision: https://phabricator.haskell.org/D3739
      7af0b906
  12. 24 Jul, 2017 1 commit
  13. 23 Jul, 2017 2 commits
    • Ben Gamari's avatar
      Fix more documentation wibbles · 2dff2c7f
      Ben Gamari authored
      Fixes #14020, #14016, #14015, #14019
      2dff2c7f
    • patrickdoc's avatar
      users-guide: Standardize and repair all flag references · 44b090be
      patrickdoc authored
      This patch does three things:
      
      1.) It simplifies the flag parsing code in `conf.py` to properly display
      flag definitions created by `.. (ghc|rts)-flag::`. Additionally, all flag
      references must include the associated arguments. Documentation has been
      added to `editing-guide.rst` to explain this.
      
      2.) It normalizes all flag definitions to a similar format. Notably, all
      instances of `<>` have been replaced with `⟨⟩`. All references across the
      users guide have been updated to match.
      
      3.) It fixes a couple issues with the flag reference table's generation code,
      which did not handle comma separated flags in the same cell and did not
      properly reference flags with arguments.
      
      Test Plan:
      `SPHINXOPTS = -n` to activate "nitpicky" mode, which reports all broken
      references. All remaining errors are references to flags without any
      documentation.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      GHC Trac Issues: #13980
      
      Differential Revision: https://phabricator.haskell.org/D3778
      44b090be
  14. 11 Jul, 2017 1 commit
  15. 06 Jul, 2017 1 commit
  16. 29 Jun, 2017 1 commit
  17. 20 May, 2017 1 commit
    • David Feuer's avatar
      A few documentation fixes · 5b8f95d7
      David Feuer authored
      `MIN_VERSION_pkg` was documented backwards. An important caveat
      about initializing the Haskell runtime was buried in a footnote.
      The documentation of `-dynamic` was (even more) confusing.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: rwbarton, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3582
      5b8f95d7
  18. 31 Jan, 2017 1 commit
  19. 23 Sep, 2016 1 commit
  20. 12 Sep, 2016 1 commit
    • Simon Marlow's avatar
      Add hs_try_putmvar() · 454033b5
      Simon Marlow authored
      Summary:
      This is a fast, non-blocking, asynchronous, interface to tryPutMVar that
      can be called from C/C++.
      
      It's useful for callback-based C/C++ APIs: the idea is that the callback
      invokes hs_try_putmvar(), and the Haskell code waits for the callback to
      run by blocking in takeMVar.
      
      The callback doesn't block - this is often a requirement of
      callback-based APIs.  The callback wakes up the Haskell thread with
      minimal overhead and no unnecessary context-switches.
      
      There are a couple of benchmarks in
      testsuite/tests/concurrent/should_run.  Some example results comparing
      hs_try_putmvar() with using a standard foreign export:
      
          ./hs_try_putmvar003 1 64 16 100 +RTS -s -N4     0.49s
          ./hs_try_putmvar003 2 64 16 100 +RTS -s -N4     2.30s
      
      hs_try_putmvar() is 4x faster for this workload (see the source for
      hs_try_putmvar003.hs for details of the workload).
      
      An alternative solution is to use the IO Manager for this.  We've tried
      it, but there are problems with that approach:
      * Need to create a new file descriptor for each callback
      * The IO Manger thread(s) become a bottleneck
      * More potential for things to go wrong, e.g. throwing an exception in
        an IO Manager callback kills the IO Manager thread.
      
      Test Plan: validate; new unit tests
      
      Reviewers: niteria, erikd, ezyang, bgamari, austin, hvr
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2501
      454033b5
  21. 09 Jan, 2016 1 commit
  22. 20 Nov, 2015 1 commit
  23. 03 Oct, 2015 1 commit