diff options
author | simonpj@microsoft.com <unknown> | 2008-09-16 09:45:21 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2008-09-16 09:45:21 +0000 |
commit | 0a7d81c6f5a289bd8ade44cd2dc71123ee89dc64 (patch) | |
tree | 64fbd1ab43e47dc439bab7a146c0c9e886204eca /docs | |
parent | ba1d2fd1914971cd2f9c351670805ea512b6a281 (diff) | |
download | haskell-0a7d81c6f5a289bd8ade44cd2dc71123ee89dc64.tar.gz |
Add link to GADT paper re rigid types
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 246e8a6fb0..da61c6a3a5 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -2437,12 +2437,16 @@ When pattern-matching against data constructors drawn from a GADT, for example in a <literal>case</literal> expression, the following rules apply: <itemizedlist> <listitem><para>The type of the scrutinee must be rigid.</para></listitem> -<listitem><para>The type of the result of the <literal>case</literal> expression must be rigid.</para></listitem> +<listitem><para>The type of the entire <literal>case</literal> expression must be rigid.</para></listitem> <listitem><para>The type of any free variable mentioned in any of the <literal>case</literal> alternatives must be rigid.</para></listitem> </itemizedlist> A type is "rigid" if it is completely known to the compiler at its binding site. The easiest way to ensure that a variable a rigid type is to give it a type signature. +For more precise details see <ulink url="http://research.microsoft.com/%7Esimonpj/papers/gadt"> +Simple unification-based type inference for GADTs +</ulink>. The criteria implemented by GHC are given in the Appendix. + </para></listitem> </itemizedlist> |