diff options
-rw-r--r-- | docs/users_guide/ghci.xml | 6 | ||||
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml index 94be422c91..3d1aecc2fb 100644 --- a/docs/users_guide/ghci.xml +++ b/docs/users_guide/ghci.xml @@ -614,7 +614,7 @@ Prelude> <sect2 id="ghci-decls"> <title>Type, class and other declarations</title> - <para>[<emphasis role="bold">New in version 7.4.1</emphasis>] At the GHCi + <para>At the GHCi prompt you can also enter any top-level Haskell declaration, including <literal>data</literal>, <literal>type</literal>, <literal>newtype</literal>, <literal>class</literal>, <literal>instance</literal>, <literal>deriving</literal>, and <literal>foreign</literal> declarations. For @@ -662,6 +662,10 @@ Prelude> an attempt to distinguish it from the new <literal>T</literal>, which is displayed as simply <literal>T</literal>.</para> + <para>Class and type-family instance declarations are simply added to the list of available isntances, with one + exception. Since type-family instances are not permitted to overlap, but you might want to re-define one, + a type-family instance <emphasis>replaces</emphasis> any earlier type instance with an identical left hand side. + (See <xref linkend="type-families"/>.)</para> </sect2> <sect2 id="ghci-scope"> diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index b03667472f..fa0f3aa4e2 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -4891,6 +4891,7 @@ type instance G (a, Int) = [a] type instance G (Char, a) = [a] -- ILLEGAL overlap, as [Char] /= [Int] </programlisting> </para> + <para> However see <xref linkend="ghci-decls"/> for the overlap rules in GHCi.</para> </sect3> <sect3 id="type-family-decidability"> |