summaryrefslogtreecommitdiff
path: root/docs/users_guide/safe_haskell.rst
Commit message (Collapse)AuthorAgeFilesLines
* Split glasgow_exts into several files (#17316)Sylvain Henry2020-01-251-868/+0
|
* Fix typos, using Wikipedia list of common typosBrian Wignall2019-11-281-1/+1
|
* users-guide: Fix links and formats for GHC 8.10Takenobu Tani2019-09-231-1/+1
| | | | | | This commit only fixes links and markdown syntax. [skip ci]
* Add -Wmissing-safe-haskell-mode warningOleg Grenrus2019-06-251-1/+17
|
* Add -Winferred-safe-imports warningOleg Grenrus2019-06-251-1/+34
| | | | | | | | | | | | | This commit partly reverts e69619e923e84ae61a6bb4357f06862264daa94b commit by reintroducing Sf_SafeInferred SafeHaskellMode. We preserve whether module was declared or inferred Safe. When declared-Safe module imports inferred-Safe, we warn. This inferred status is volatile, often enough it's a happy coincidence, something which cannot be relied upon. However, explicitly Safe or Trustworthy packages won't accidentally become Unsafe. Updates haddock submodule.
* users-guide: Update -Wsafe description for #16689Ben Gamari2019-06-191-1/+2
| | | | | We no longer emit a warning when a safe module is explicitly declared as such.
* users-guide: Fix a variety of broken links and syntaxBen Gamari2019-06-191-14/+15
|
* users-guide: Update Wiki URLs to point to GitLabTakenobu Tani2019-03-191-1/+1
| | | | | | | | | | 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]
* Add -fno-safe-haskell flagMatthew Pickering2018-12-071-0/+17
| | | | | | | | | | | | | | | | | This flag can be set to turn off the Safe Haskell checks. Whether a module is marked Safe/Unsafe/Trustworthy is ignored when this flag to set. Reviewers: bgamari, tdammers Reviewed By: tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15920 Differential Revision: https://phabricator.haskell.org/D5360
* docs: remove leftovers of static flagsKrzysztof Gogolewski2018-07-121-3/+3
| | | | | | | | | | | | | | | | Remove "dynamic + :set" category from documentation, because all dynamic flags support ":set"; this is a leftover of "static + :set". Test Plan: make html Reviewers: bgamari, mpickering Reviewed By: mpickering Subscribers: mpickering, osa1, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4942
* Make language extensions their own category in the documentationJoachim Breitner2017-10-251-54/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 9278994 which did this change to error messages already. Differential Revision: https://phabricator.haskell.org/D4112
* User's guide: Fix the category of some flagsJoachim Breitner2017-10-191-7/+7
| | | | so now “7.6.12. Language options” only lists `-X` flags, as it should.
* A bunch of typofixesGabor Greif2017-09-261-1/+1
|
* users_guide: Convert mkUserGuidePart generation to a Sphinx extensionPatrick Dougherty2017-08-181-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix more documentation wibblesBen Gamari2017-07-231-1/+1
| | | | Fixes #14020, #14016, #14015, #14019
* Update docs to reflect changes to DeriveDataTypeableChris Martin2017-06-271-5/+0
|
* Spelling fixesGabor Greif2017-02-021-2/+2
|
* Typos and grammar in manual/commentsGabor Greif2017-01-231-2/+2
|
* Implement deriving strategiesRyan Scott2016-09-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allows users to explicitly request which approach to `deriving` to use via keywords, e.g., ``` newtype Foo = Foo Bar deriving Eq deriving stock Ord deriving newtype Show ``` Fixes #10598. Updates haddock submodule. Test Plan: ./validate Reviewers: hvr, kosmikus, goldfire, alanz, bgamari, simonpj, austin, erikd, simonmar Reviewed By: alanz, bgamari, simonpj Subscribers: thomie, mpickering, oerjan Differential Revision: https://phabricator.haskell.org/D2280 GHC Trac Issues: #10598
* Document Safe Haskell restrictions on Generic instancesRyan Scott2016-09-301-0/+9
| | | | | Commit 578fbeca31dd3d755e24e910c3a7327f92bc4ee3 disallowed hand-written `Generic` instances in Safe Haskell, but this wasn't documented anywhere.
* docs: add newline after '.. ghc-flag::'Sergei Trofimovich2016-02-101-0/+3
| | | | | | | | Noticed when looked through sphinx warnings: docs/users_guide/safe_haskell.rst:4: SEVERE: Duplicate ID: "ghc-flag-Issue" Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* users-guide: Add since annotations for language extensionsBen Gamari2016-01-141-0/+6
| | | | | Based off of https://ghc.haskell.org/trac/ghc/wiki/LanguagePragmaHistory.
* user-guide/safe_haskell: Fix typosBen Gamari2016-01-091-4/+4
|
* users_guide: Use semantic directive/role for command line optionsBen Gamari2016-01-091-74/+74
| | | | | | And GHCi commands. This makes cross-referencing much easier. Also normalize markup a bit and add some missing flags.
* Add `-W(no-)xxx` aliases for `-f(no-)warn-xxx` flagsDavid Luposchainsky2015-12-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | This also updates the user's guide to refer to the `-W`-based warning flags by default. Quoting the release note entry: | Warnings can now be controlled with `-W(no-)...` flags in addition to | the old `-f(no-)warn...` ones. This was done as the first part of a | rewrite of the warning system to provide better control over warnings, | better warning messages, and more common syntax compared to other | compilers. The old `-fwarn...`-based warning flags will remain | functional for the forseeable future. This is part of https://ghc.haskell.org/wiki/Design/Warnings and addresses #11218 Reviewed By: hvr, bgamari Differential Revision: https://phabricator.haskell.org/D1613
* Move user's guide to ReStructuredTextBen Gamari2015-10-031-0/+748