Skip to content
Snippets Groups Projects
Commit de7558a6 authored by Austin Seipp's avatar Austin Seipp
Browse files

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: default avatarAustin Seipp <austin@well-typed.com>
(cherry picked from commit 71611523)
parent c0c055e9
No related branches found
No related tags found
No related merge requests found
...@@ -107,7 +107,12 @@ ...@@ -107,7 +107,12 @@
that previously compiled will no longer work. that previously compiled will no longer work.
For more information, see <xref linkend="roles"/>. 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>
<listitem> <listitem>
...@@ -462,9 +467,9 @@ ...@@ -462,9 +467,9 @@
that have the same run-time-presentation, such as that have the same run-time-presentation, such as
newtypes, but also newtypes inside containers. See the newtypes, but also newtypes inside containers. See the
haddock documentation of 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 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. for more details.
</para> </para>
<para> <para>
...@@ -773,6 +778,20 @@ ...@@ -773,6 +778,20 @@
<para> <para>
There is now a <literal>Data</literal> instance for <literal>Data.Version</literal>. There is now a <literal>Data</literal> instance for <literal>Data.Version</literal>.
</para> </para>
</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>
<listitem> <listitem>
<para> <para>
......
...@@ -186,18 +186,18 @@ ...@@ -186,18 +186,18 @@
</para> </para>
<para> <para>
The use of the <option>-XSafe</option> flag to compile the Danger module The use of the <option>-XSafe</option> flag to compile the
restricts the features of Haskell that can be used to a Danger module restricts the features of Haskell that can be used
<link linkend="safe-language">safe subset</link>. This includes to a <link linkend="safe-language">safe subset</link>. This
disallowing <literal>unsafePerformIO</literal>, Template Haskell, pure includes disallowing <literal>unsafePerformIO</literal>,
FFI functions, Generalized Newtype Deriving, RULES and restricting the Template Haskell, pure FFI functions, RULES and restricting the
operation of Overlapping Instances. The <option>-XSafe</option> flag also operation of Overlapping Instances. The <option>-XSafe</option>
restricts the modules can be imported by Danger to only those that are flag also restricts the modules can be imported by Danger to
considered trusted. Trusted modules are those compiled with only those that are considered trusted. Trusted modules are
<option>-XSafe</option>, where GHC provides a mechanical guarantee that those compiled with <option>-XSafe</option>, where GHC provides
the code is safe. Or those modules compiled with a mechanical guarantee that the code is safe. Or those modules
<option>-XTrustworthy</option>, where the module author claims that the compiled with <option>-XTrustworthy</option>, where the module
module is Safe. author claims that the module is Safe.
</para> </para>
<para> <para>
...@@ -254,6 +254,7 @@ ...@@ -254,6 +254,7 @@
for example, that the <literal>unsafePerformIO :: IO a -> a</literal> for example, that the <literal>unsafePerformIO :: IO a -> a</literal>
function is disallowed in the safe language. function is disallowed in the safe language.
</listitem> </listitem>
<listitem><emphasis>Module boundary control</emphasis> &mdash; Haskell <listitem><emphasis>Module boundary control</emphasis> &mdash; Haskell
code compiled using the safe language is guaranteed to only access code compiled using the safe language is guaranteed to only access
symbols that are publicly available to it through other modules export symbols that are publicly available to it through other modules export
...@@ -263,10 +264,8 @@ ...@@ -263,10 +264,8 @@
through careful use of its export list then code compiled using the through careful use of its export list then code compiled using the
safe language that imports M is guaranteed to respect those invariants. safe language that imports M is guaranteed to respect those invariants.
Because of this, <emphasis><link linkend="template-haskell">Template Because of this, <emphasis><link linkend="template-haskell">Template
Haskell</link></emphasis> and <emphasis> Haskell</link></emphasis> is disabled in the safe language as it can be
<link linkend="newtype-deriving">GeneralizedNewtypeDeriving</link> used to violate this property.
</emphasis> are disabled in the safe language as they can be used
to violate this property.
</listitem> </listitem>
<listitem><emphasis>Semantic consistency</emphasis> &mdash; The safe <listitem><emphasis>Semantic consistency</emphasis> &mdash; The safe
language is strictly a subset of Haskell as implemented by GHC. Any language is strictly a subset of Haskell as implemented by GHC. Any
...@@ -294,10 +293,6 @@ ...@@ -294,10 +293,6 @@
following features: following features:
<itemizedlist> <itemizedlist>
<listitem><emphasis>GeneralizedNewtypeDeriving</emphasis> &mdash; 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> &mdash; Is particularly <listitem><emphasis>TemplateHaskell</emphasis> &mdash; Is particularly
dangerous, as it can cause side effects even at compilation time and dangerous, as it can cause side effects even at compilation time and
can be used to access constructors of abstract data types.</listitem> can be used to access constructors of abstract data types.</listitem>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment