[commit: ghc] ghc-8.0: users-guide: Wibbles (74cf491)

git at git.haskell.org git at git.haskell.org
Tue Mar 29 10:38:19 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/74cf4919c715d0aaadb3f1c2b64420d53ea652ab/ghc

>---------------------------------------------------------------

commit 74cf4919c715d0aaadb3f1c2b64420d53ea652ab
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Mon Mar 28 15:40:34 2016 +0200

    users-guide: Wibbles
    
    (cherry picked from commit eb8bc4dadb767729ae267db7ec7d3bee29f48463)


>---------------------------------------------------------------

74cf4919c715d0aaadb3f1c2b64420d53ea652ab
 docs/users_guide/glasgow_exts.rst | 40 +++++++++++++++++++++++++++++++++------
 1 file changed, 34 insertions(+), 6 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 430431f..f74cc88 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -652,6 +652,8 @@ n+k patterns
 
 .. ghc-flag:: -XNPlusKPatterns
 
+    :since: 6.12
+
     Enable use of ``n+k`` patterns.
 
 .. _recursive-do-notation:
@@ -1174,6 +1176,12 @@ Monad comprehensions
 .. index::
    single: monad comprehensions
 
+.. ghc-flag:: -XMonadComprehensions
+
+    :since: 7.2
+
+    Enable list comprehension syntax for arbitrary monads.
+
 Monad comprehensions generalise the list comprehension notation,
 including parallel comprehensions (:ref:`parallel-list-comprehensions`)
 and transform comprehensions (:ref:`generalised-list-comprehensions`) to
@@ -1241,7 +1249,7 @@ Monad comprehensions support:
                             return y)
           return (x+y)
 
-All these features are enabled by default if the ``MonadComprehensions``
+All these features are enabled by default if the :ghc-flag:`-XMonadComprehensions`
 extension is enabled. The types and more detailed examples on how to use
 comprehensions are explained in the previous chapters
 :ref:`generalised-list-comprehensions` and
@@ -1252,14 +1260,14 @@ comprehensions.
 .. note::
     Even though most of these examples are using the list monad, monad
     comprehensions work for any monad. The ``base`` package offers all
-    necessary instances for lists, which make ``MonadComprehensions``
+    necessary instances for lists, which make :ghc-flag:`-XMonadComprehensions`
     backward compatible to built-in, transform and parallel list
     comprehensions.
 
 More formally, the desugaring is as follows. We write ``D[ e | Q]`` to
 mean the desugaring of the monad comprehension ``[ e | Q]``:
 
-::
+.. code-block:: none
 
     Expressions: e
     Declarations: d
@@ -1462,6 +1470,8 @@ Tuple sections
 
 .. ghc-flag:: -XTupleSections
 
+    :since: 6.12
+
     Allow the use of tuple section syntax
 
 The :ghc-flag:`-XTupleSections` flag enables Python-style partially applied
@@ -1725,6 +1735,8 @@ Safe imports
               -XUnsafe
     :noindex:
 
+    :since: 7.2
+
     Declare the Safe Haskell state of the current module.
 
 With the :ghc-flag:`-XSafe`, :ghc-flag:`-XTrustworthy` and :ghc-flag:`-XUnsafe`
@@ -2359,6 +2371,8 @@ Declaring data types with explicit constructor signatures
 
 .. ghc-flag:: -XGADTSyntax
 
+    :since: 7.2
+
     Allow the use of GADT syntax in data type definitions (but not GADTs
     themselves; for this see :ghc-flag:`-XGADTs`)
 
@@ -3247,18 +3261,26 @@ Deriving instances of extra classes (``Data``, etc.)
 
 .. ghc-flag:: -XDeriveGeneric
 
+    :since: 7.2
+
     Allow automatic deriving of instances for the ``Generic`` typeclass.
 
 .. ghc-flag:: -XDeriveFunctor
 
+    :since: 6.12
+
     Allow automatic deriving of instances for the ``Functor`` typeclass.
 
 .. ghc-flag:: -XDeriveFoldable
 
+    :since: 6.12
+
     Allow automatic deriving of instances for the ``Foldable`` typeclass.
 
 .. ghc-flag:: -XDeriveTraversable
 
+    :since: 6.12
+
     :implies: :ghc-flag:`-XDeriveFoldable`, :ghc-flag:`-XDeriveFunctor`
 
     Allow automatic deriving of instances for the ``Traversable`` typeclass.
@@ -4533,6 +4555,8 @@ Default method signatures
 
 .. ghc-flag:: -XDefaultSignatures
 
+    :since: 7.2
+
     Allows the definition of default method signatures in class definitions.
 
 Haskell 98 allows you to define a default implementation when declaring
@@ -7088,7 +7112,7 @@ See also :ghc-ticket:`7347`.
 Kind polymorphism and Type-in-Type
 ==================================
 
-.. ghc-flag: -XTypeInType
+.. ghc-flag:: -XTypeInType
 
     :implies: :ghc-flag:`-XPolyKinds`, :ghc-flag:`-XDataKinds`, :ghc-flag:`-XKindSignatures`
     :since: 8.0.1
@@ -8027,6 +8051,8 @@ Explicit universal quantification (forall)
 
 .. ghc-flag:: -XExplicitForAll
 
+    :since: 6.12
+
     Allow use of the ``forall`` keyword in places where universal quantification
     is implicit.
 
@@ -8566,6 +8592,8 @@ Let-generalisation
 
 .. ghc-flag:: -XMonoLocalBinds
 
+    :since: 6.12
+
     Infer less polymorphic types for local bindings by default.
 
 An ML-style language usually generalises the type of any ``let``\-bound or
@@ -8917,7 +8945,6 @@ Arbitrary-rank polymorphism
 
 .. ghc-flag:: -XRankNTypes
 
-
     :implies: :ghc-flag:`-XExplicitForAll`
 
     Allow types of arbitrary rank.
@@ -9853,12 +9880,13 @@ Syntax
 .. ghc-flag:: -XTemplateHaskell
 
     :implies: :ghc-flag:`-XTemplateHaskellQuotes`
-    :since: 8.0.1
 
     Enable Template Haskell's splice and quotation syntax.
 
 .. ghc-flag:: -XTemplateHaskellQuotes
 
+    :since: 8.0.1
+
     Enable only Template Haskell's quotation syntax.
 
 Template Haskell has the following new syntactic constructions. You need to use



More information about the ghc-commits mailing list