Commit b4036c30 authored by dterei's avatar dterei
Browse files

Update Safe Haskell documentation for new design in 7.4

parent 0c9427cd
......@@ -1096,14 +1096,14 @@
<entry><option>-</option></entry>
</row>
<row>
<entry><option>-XSafeLanguage</option></entry>
<entry>Enable the <link linkend="safe-haskell">Safe Haskell</link> Safe Language.</entry>
<entry><option>-XUnsafe</option></entry>
<entry>Enable <link linkend="safe-haskell">Safe Haskell</link> Unsafe mode.</entry>
<entry>dynamic</entry>
<entry><option>-</option></entry>
</row>
<row>
<entry><option>-XSafeImports</option></entry>
<entry>Enable <link linkend="safe-imports-ext">Safe Imports</link>.</entry>
<entry><option>-fpackage-trust</option></entry>
<entry>Enable <link linkend="safe-haskell">Safe Haskell</link> trusted package requirement for trustworty modules.</entry>
<entry>dynamic</entry>
<entry><option>-</option></entry>
</row>
......@@ -1352,6 +1352,24 @@
<entry><option>-fno-warn-wrong-do-bind</option></entry>
</row>
<row>
<entry><option>-fwarn-unsafe</option></entry>
<entry>warn if the module being compiled is regarded to be unsafe.
Should be used to check the safety status of modules when using safe
inference.</entry>
<entry>dynamic</entry>
<entry><option>-fno-warn-unsafe</option></entry>
</row>
<row>
<entry><option>-fwarn-safe</option></entry>
<entry>warn if the module being compiled is regarded to be safe.
Should be used to check the safety status of modules when using safe
inference.</entry>
<entry>dynamic</entry>
<entry><option>-fno-warn-safe</option></entry>
</row>
</tbody>
</tgroup>
</informaltable>
......
......@@ -1895,19 +1895,20 @@ import "network" Network.Socket
<sect2 id="safe-imports-ext">
<title>Safe imports</title>
<para>With the <option>-XSafeImports</option> flag, GHC extends
the import declaration syntax to take an optional <literal>safe</literal>
keyword after the <literal>import</literal> keyword. This feature
is part of the Safe Haskell GHC extension. For example:</para>
<para>With the <option>-XSafe</option>, <option>-XTrustworthy</option>
and <option>-XUnsafe</option> language flags, GHC extends
the import declaration syntax to take an optional <literal>safe</literal>
keyword after the <literal>import</literal> keyword. This feature
is part of the Safe Haskell GHC extension. For example:</para>
<programlisting>
import safe qualified Network.Socket as NS
</programlisting>
<para>would import the module <literal>Network.Socket</literal>
with compilation only succeeding if Network.Socket can be
safely imported. For a description of when a import is
considered safe see <xref linkend="safe-haskell"/></para>
with compilation only succeeding if Network.Socket can be
safely imported. For a description of when a import is
considered safe see <xref linkend="safe-haskell"/></para>
</sect2>
......
......@@ -105,7 +105,8 @@ $ ghc-pkg list
status. A package can be either trusted or not trusted (distrusted).
By default packages are distrusted. This property of a package only
plays a role when compiling code using GHC's Safe Haskell feature
(see <xref linkend="safe-haskell"/>).
(see <xref linkend="safe-haskell"/>) with the
<option>-fpackage-trust</option> flag enabled.
</para>
<para>To see which modules are provided by a package use the
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment