[commit: ghc] master: Documentation updates for 7.8.1 release (7161152)

git at git.haskell.org git at git.haskell.org
Fri Feb 28 22:23:52 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/71611523c25bb89b81e789d5a2dd3d5d9754b025/ghc

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

commit 71611523c25bb89b81e789d5a2dd3d5d9754b025
Author: Austin Seipp <austin at well-typed.com>
Date:   Fri Feb 28 16:23:17 2014 -0600

    Documentation updates for 7.8.1 release
    
    Notably, GND is now usable with Safe Haskell. Also, Coercible now is in
    Data.Coerce canonically, and we added some more instances.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

71611523c25bb89b81e789d5a2dd3d5d9754b025
 docs/users_guide/7.8.1-notes.xml  |   25 ++++++++++++++++++++++---
 docs/users_guide/safe_haskell.xml |   35 +++++++++++++++--------------------
 2 files changed, 37 insertions(+), 23 deletions(-)

diff --git a/docs/users_guide/7.8.1-notes.xml b/docs/users_guide/7.8.1-notes.xml
index 7568246..81b22c2 100644
--- a/docs/users_guide/7.8.1-notes.xml
+++ b/docs/users_guide/7.8.1-notes.xml
@@ -107,7 +107,12 @@
                 that previously compiled will no longer work.
 
                 For more information, see <xref linkend="roles"/>.
-           </para>
+          </para>
+           <para>
+                As a result of this change,
+                <literal>GeneralizedNewtypeDeriving</literal> can now
+                be used with Safe Haskell.
+          </para>
        </listitem>
 
         <listitem>
@@ -454,9 +459,9 @@
                      that have the same run-time-presentation, such as
                      newtypes, but also newtypes inside containers. See the
                      haddock documentation of
-                     <ulink url="&libraryBaseLocation;/GHC-Exts.html#v%3Acoerce">coerce</ulink>
+                     <ulink url="&libraryBaseLocation;/Data-Coerce.html#v%3Acoerce">coerce</ulink>
                      and of the class
-                     <ulink url="&libraryBaseLocation;/GHC-Exts.html#t%3ACoercible">Coercible</ulink>
+                     <ulink url="&libraryBaseLocation;/Data-Coerce.html#t%3ACoercible">Coercible</ulink>
                      for more details.
                </para>
                 <para>
@@ -768,6 +773,20 @@
            </listitem>
              <listitem>
                 <para>
+                    There are now <literal>Data</literal>,
+                    <literal>Typeable</literal>, and
+                    <literal>Generic</literal> instances for the types
+                    in <literal>Data.Monoid</literal> and
+                    <literal>Control.Applicative</literal>
+               </para>
+           </listitem>
+             <listitem>
+                <para>
+                    There are now <literal>Num</literal> instances for <literal>Data.Monoid.Product</literal> and <literal>Data.Monoid.Sum</literal>
+               </para>
+           </listitem>
+             <listitem>
+                <para>
                     There are now <literal>Eq</literal>, <literal>Ord</literal>, <literal>Show</literal> and <literal>Read</literal> instances for <literal>ZipList</literal>.
                </para>
            </listitem>
diff --git a/docs/users_guide/safe_haskell.xml b/docs/users_guide/safe_haskell.xml
index 04a244b..10d0a63 100644
--- a/docs/users_guide/safe_haskell.xml
+++ b/docs/users_guide/safe_haskell.xml
@@ -186,18 +186,18 @@
       </para>
 
       <para>
-      The use of the <option>-XSafe</option> flag to compile the Danger module
-      restricts the features of Haskell that can be used to a
-      <link linkend="safe-language">safe subset</link>. This includes
-      disallowing <literal>unsafePerformIO</literal>, Template Haskell, pure
-      FFI functions, Generalized Newtype Deriving, RULES and restricting the
-      operation of Overlapping Instances. The <option>-XSafe</option> flag also
-      restricts the modules can be imported by Danger to only those that are
-      considered trusted. Trusted modules are those compiled with
-      <option>-XSafe</option>, where GHC provides a mechanical guarantee that
-      the code is safe. Or those modules compiled with
-      <option>-XTrustworthy</option>, where the module author claims that the
-      module is Safe.
+      The use of the <option>-XSafe</option> flag to compile the
+      Danger module restricts the features of Haskell that can be used
+      to a <link linkend="safe-language">safe subset</link>. This
+      includes disallowing <literal>unsafePerformIO</literal>,
+      Template Haskell, pure FFI functions, RULES and restricting the
+      operation of Overlapping Instances. The <option>-XSafe</option>
+      flag also restricts the modules can be imported by Danger to
+      only those that are considered trusted. Trusted modules are
+      those compiled with <option>-XSafe</option>, where GHC provides
+      a mechanical guarantee that the code is safe. Or those modules
+      compiled with <option>-XTrustworthy</option>, where the module
+      author claims that the module is Safe.
       </para>
 
       <para>
@@ -254,6 +254,7 @@
         for example, that the <literal>unsafePerformIO :: IO a -> a</literal>
         function is disallowed in the safe language.
       </listitem>
+
       <listitem><emphasis>Module boundary control</emphasis> — Haskell
         code compiled using the safe language is guaranteed to only access
         symbols that are publicly available to it through other modules export
@@ -263,10 +264,8 @@
         through careful use of its export list then code compiled using the
         safe language that imports M is guaranteed to respect those invariants.
         Because of this, <emphasis><link linkend="template-haskell">Template
-        Haskell</link></emphasis> and <emphasis>
-        <link linkend="newtype-deriving">GeneralizedNewtypeDeriving</link>
-        </emphasis> are disabled in the safe language as they can be used
-        to violate this property.
+        Haskell</link></emphasis> is disabled in the safe language as it can be
+        used to violate this property.
       </listitem>
       <listitem><emphasis>Semantic consistency</emphasis> — The safe
         language is strictly a subset of Haskell as implemented by GHC. Any
@@ -294,10 +293,6 @@
     following features:
 
     <itemizedlist>
-      <listitem><emphasis>GeneralizedNewtypeDeriving</emphasis> — It can
-        be used to violate constructor access control, by allowing untrusted
-        code to manipulate protected data types in ways the data type author
-        did not intend, breaking invariants they have established.</listitem>
       <listitem><emphasis>TemplateHaskell</emphasis> — Is particularly
         dangerous, as it can cause side effects even at compilation time and
         can be used to access constructors of abstract data types.</listitem>



More information about the ghc-commits mailing list