diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2023-04-20 16:18:15 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-04-21 18:03:04 -0400 |
commit | 038bb03157cabf53bd08426cbd86a38486b9752d (patch) | |
tree | fdc2aace711a71f038ec7d5b56129e7abd0a226f | |
parent | 113e21d763678ea7e7666b708e6c2dba7e52382f (diff) | |
download | haskell-038bb03157cabf53bd08426cbd86a38486b9752d.tar.gz |
Minor doc fixes
- Add docs/index.html to .gitignore.
It is created by ./hadrian/build docs, and it was the only file
in Hadrian's templateRules not present in .gitignore.
- Mention that MultiWayIf supports non-boolean guards
- Remove documentation of optdll - removed in 2007, 763daed95
- Fix markdown syntax
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | docs/users_guide/exts/multiway_if.rst | 8 | ||||
-rw-r--r-- | docs/users_guide/javascript.rst | 10 | ||||
-rw-r--r-- | docs/users_guide/phases.rst | 7 | ||||
-rw-r--r-- | docs/users_guide/using-warnings.rst | 2 |
5 files changed, 15 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore index f9367b9735..b2cb1540ed 100644 --- a/.gitignore +++ b/.gitignore @@ -115,6 +115,7 @@ _darcs/ /compiler/ghc.cabal.old /distrib/configure.ac /distrib/ghc.iss +/docs/index.html /docs/man /docs/users_guide/.log /docs/users_guide/users_guide diff --git a/docs/users_guide/exts/multiway_if.rst b/docs/users_guide/exts/multiway_if.rst index 0db010c000..3d9fa58ef7 100644 --- a/docs/users_guide/exts/multiway_if.rst +++ b/docs/users_guide/exts/multiway_if.rst @@ -51,3 +51,11 @@ except that the semi-colons between guards in a multi-way if are optional. So it is not necessary to line up all the guards at the same column; this is consistent with the way guards work in function definitions and case expressions. + +Note that multi-way if supports guards other than boolean conditions: :: + + if | parseNumbers settings + , Just (exponent, mantissa) <- decomposeNumber str + , let (integralPart, fractionPart) = parse mantissa + , integralPart >= 0 = ... + | otherwise = ... diff --git a/docs/users_guide/javascript.rst b/docs/users_guide/javascript.rst index f33c146f87..3926802d3a 100644 --- a/docs/users_guide/javascript.rst +++ b/docs/users_guide/javascript.rst @@ -1,4 +1,4 @@ -.. _ffi-javascript +.. _ffi-javascript: FFI and the JavaScript Backend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -23,7 +23,7 @@ look like: js_add :: Int -> Int -> Int JSVal -^^^^^ +~~~~~ The JavaScript backend has a concept of an untyped 'plain' JavaScript value, under the guise of the type ``JSVal``. Values having this type @@ -47,7 +47,7 @@ It also contains functions for working with objects: * ``getProp :: JSVal -> String -> JSVal`` - object field access JavaScript FFI Types -^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~ Some types are able to be used directly in the type signatures of foreign exports, without conversion to a ``JSVal``. We saw in the first example @@ -75,7 +75,7 @@ for the Haskell `Bool` type: type_error :: Bool -> Bool JavaScript Callbacks -^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~ The JavaScript execution model is based around callback functions, and GHC's JavaScript backend implements these as a type in order to support @@ -146,7 +146,7 @@ passed as an ``Int`` to a ``Callback`` that accepts a ``JSVal``: releaseCallback add3 Callbacks as Foreign Exports -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JavaScript callbacks allow for a sort of FFI exports via FFI imports. To do this, a global JavaScript variable is set, and that global variable can then diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst index f60ee30709..646ee09288 100644 --- a/docs/users_guide/phases.rst +++ b/docs/users_guide/phases.rst @@ -247,13 +247,6 @@ the following flags: Pass ⟨option⟩ to the linker when merging object files. In the case of a standard ``ld``-style linker this should generally include the ``-r`` flag. -.. ghc-flag:: -optdll ⟨option⟩ - :shortdesc: pass ⟨option⟩ to the DLL generator - :type: dynamic - :category: phase-options - - Pass ⟨option⟩ to the DLL generator. - .. ghc-flag:: -optwindres ⟨option⟩ :shortdesc: pass ⟨option⟩ to ``windres``. :type: dynamic diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index e0c4d7b1d8..62a0f723df 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -2358,7 +2358,7 @@ of ``-W(no-)*``. :since: 9.6.1 - As explained in :ref:`undecidable_instances`, when using + As explained in :ref:`undecidable-instances`, when using :extension:`UndecidableInstances` it is possible for GHC to construct non-terminating evidence for certain superclass constraints. |