Added -ftype-families to the user's manual
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>
Tue, 15 May 2007 01:20:36 +0000 (01:20 +0000)
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>
Tue, 15 May 2007 01:20:36 +0000 (01:20 +0000)
- This adds the option to the flag reference and puts a stub pointing to the
  Haskell wiki page about type families into the section about type extensions.
- Once, the implementation has stabilised, the material from the wiki page
  will be integreated into the user's manual.

docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml

index 8e18570..aca1d47 100644 (file)
              <entry><option>-fno-th</option></entry>
            </row>
            <row>
              <entry><option>-fno-th</option></entry>
            </row>
            <row>
+             <entry><option>-ftype-families</option></entry>
+             <entry>Enable <link linkend="type-families">type families</link>.</entry>
+             <entry>dynamic</entry>
+             <entry><option>-fno-type-families</option></entry>
+           </row>
+           <row>
              <entry><option>-fbang-patterns</option></entry>
              <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
              <entry>dynamic</entry>
              <entry><option>-fbang-patterns</option></entry>
              <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
              <entry>dynamic</entry>
index 61cff6e..ac10e21 100644 (file)
@@ -4139,6 +4139,33 @@ to work since it gets translated into an equality comparison.
 </para>
 </sect2>
 
 </para>
 </sect2>
 
+<sect2 id="type-families">
+<title>Type families
+</title>
+
+<para>
+GHC supports the definition of type families indexed by types.  They may be
+seen as an extension of Haskell 98's class-based overloading of values to
+types.  When type families are declared in classes, they are also known as
+associated types.
+</para>
+<para>
+There are two forms of type families: data families and type synonym families.
+Currently, only the former are fully implemented, while we are still working
+on the latter.  As a result, the specification of the language extension is
+also still to some degree in flux.  Hence, a more detailed description of
+the language extension and its use is currently available
+from <ulink url="http://haskell.org/haskellwiki/GHC/Indexed_types">the Haskell
+wiki page on type families</ulink>.  The material will be moved to this user's
+guide when it has stabilised.
+</para>
+<para>
+Type families are enabled by the flag <option>-ftype-families</option>.
+</para>
+
+
+</sect2>
+
 </sect1>
 <!-- ==================== End of type system extensions =================  -->
   
 </sect1>
 <!-- ==================== End of type system extensions =================  -->