[project @ 2004-04-05 11:14:29 by simonpj]
[ghc-hetmet.git] / ghc / docs / users_guide / ghci.sgml
index d87c1db..dc391c0 100644 (file)
@@ -63,6 +63,7 @@ Prelude>
    :show bindings             show the current bindings made at the prompt
 
    :type <expr>               show the type of <expr>
+   :kind <type>               show the kind of <type>
    :undef <cmd>               undefine user-defined command :<cmd>
    :unset <option> ...        unset options
    :quit                      exit GHCi
@@ -1059,6 +1060,17 @@ Prelude> :def make (\_ -> return ":! ghc ––make Main")
       </varlistentry>
 
       <varlistentry>
+       <term><literal>:kind</literal> <replaceable>type</replaceable></term>
+       <indexterm><primary><literal>:kind</literal></primary></indexterm>
+       <listitem>
+         <para>Infers and prints the kind of
+         <replaceable>type</replaceable>. The latter can be an arbitrary
+           type expression, including a partial application of a type constructor,
+           such as <literal>Either Int</literal>.</para>
+       </listitem>
+      </varlistentry>
+
+      <varlistentry>
        <term><literal>:undef</literal> <replaceable>name</replaceable></term>
        <indexterm><primary><literal>:undef</literal></primary></indexterm>
        <listitem>