[commit: ghc] ghc-8.2: users-guide: Document multi-line DEPRECATED pragmas (d8794aa)

git at git.haskell.org git at git.haskell.org
Fri Jun 16 21:00:41 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/d8794aa582687846178a0b11604b736212cbf936/ghc

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

commit d8794aa582687846178a0b11604b736212cbf936
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Jun 12 17:00:55 2017 -0400

    users-guide: Document multi-line DEPRECATED pragmas
    
    Fixes #13791.
    
    [skip ci]
    
    Test Plan: Read it
    
    Reviewers: austin
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #13791
    
    Differential Revision: https://phabricator.haskell.org/D3639
    
    (cherry picked from commit 8f72608953fee7ff77a6d89b00f25749261b8820)


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

d8794aa582687846178a0b11604b736212cbf936
 docs/users_guide/glasgow_exts.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 4a7ef74..5b71c02 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -12503,6 +12503,12 @@ are two ways of using these pragmas.
    both are in scope. If both are in scope, there is currently no way to
    specify one without the other (c.f. fixities :ref:`infix-tycons`).
 
+Also note that the argument to ``DEPRECATED`` and ``WARNING`` can also be a list
+of strings, in which case the strings will be presented on separate lines in the
+resulting warning message, ::
+
+    {-# DEPRECATED foo, bar ["Don't use these", "Use gar instead"] #-}
+
 Warnings and deprecations are not reported for (a) uses within the
 defining module, (b) defining a method in a class instance, and (c) uses
 in an export list. The latter reduces spurious complaints within a



More information about the ghc-commits mailing list