diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/flags.xml | 9 | ||||
-rwxr-xr-x | docs/users_guide/glasgow_exts.xml | 15 | ||||
-rw-r--r-- | docs/users_guide/using.xml | 14 |
3 files changed, 35 insertions, 3 deletions
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml index e765525c13..1245d25fde 100644 --- a/docs/users_guide/flags.xml +++ b/docs/users_guide/flags.xml @@ -1538,6 +1538,15 @@ </row> <row> + <entry><option>-fpedantic-bottoms</option></entry> + <entry>Make GHC be more precise about its treatment of bottom (but see also + <option>-fno-state-hack</option>). In particular, GHC will not + eta-expand through a case expression.</entry> + <entry>dynamic</entry> + <entry><option>-fno-pedantic-bottoms</option></entry> + </row> + + <row> <entry><option>-fomit-interface-pragmas</option></entry> <entry>Don't generate interface pragmas</entry> <entry>dynamic</entry> diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 6d1b293701..1eb041bc27 100755 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -8344,12 +8344,21 @@ happen. </programlisting> <para>A <literal>SPECIALIZE</literal> pragma for a function can - be put anywhere its type signature could be put.</para> + be put anywhere its type signature could be put. Moreover, you + can also <literal>SPECIALIZE</literal> an <emphasis>imported</emphasis> + provided it was given an <literal>INLINABLE</literal> pragma at its definition site + (<xref linkend="inlinable-pragma"/>)</para> <para>A <literal>SPECIALIZE</literal> has the effect of generating (a) a specialised version of the function and (b) a rewrite rule - (see <xref linkend="rewrite-rules"/>) that rewrites a call to the - un-specialised function into a call to the specialised one.</para> + (see <xref linkend="rewrite-rules"/>) that rewrites a call to + the un-specialised function into a call to the specialised one. + Moreover, given a <literal>SPECIALIZE</literal> pragma for a + function <literal>f</literal>, GHC will automatically create + specialisations for any type-class-overloaded functions called + by <literal>f</literal>, if they are in the same module as + the <literal>SPECIALIZE</literal> pragma, or if they are + <literal>INLINABLE</literal>; and so on, transitively.</para> <para>The type in a SPECIALIZE pragma can be any type that is less polymorphic than the type of the original function. In concrete terms, diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 4cace1ee88..2837842a0e 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -1856,6 +1856,20 @@ f "2" = 2 <varlistentry> <term> + <option>-fpedantic-bottoms</option> + <indexterm><primary><option>-fpedantic-bottoms</option></primary></indexterm> + </term> + <listitem> + <para>Make GHC be more precise about its treatment of bottom (but see also + <option>-fno-state-hack</option>). In particular, stop GHC + eta-expanding through a case expression, which is good for + performance, but bad if you are using <literal>seq</literal> on + partial applications.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term> <option>-fomit-interface-pragmas</option> <indexterm><primary><option>-fomit-interface-pragmas</option></primary></indexterm> </term> |