[Git][ghc/ghc][wip/minor-docs] Minor doc fixes

Krzysztof Gogolewski (@monoidal) gitlab at gitlab.haskell.org
Thu Apr 20 14:35:16 UTC 2023



Krzysztof Gogolewski pushed to branch wip/minor-docs at Glasgow Haskell Compiler / GHC


Commits:
83664b5a by Krzysztof Gogolewski at 2023-04-20T16:35:04+02:00
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

- - - - -


5 changed files:

- .gitignore
- docs/users_guide/exts/multiway_if.rst
- docs/users_guide/javascript.rst
- docs/users_guide/phases.rst
- docs/users_guide/using-warnings.rst


Changes:

=====================================
.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


=====================================
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 = ...


=====================================
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


=====================================
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


=====================================
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.
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83664b5aca556ad0433183958fee6b640fc5eb48

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83664b5aca556ad0433183958fee6b640fc5eb48
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230420/8d44e4a1/attachment-0001.html>


More information about the ghc-commits mailing list