From: simonpj@microsoft.com Date: Tue, 16 Sep 2008 09:45:21 +0000 (+0000) Subject: Add link to GADT paper re rigid types X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0a7d81c6f5a289bd8ade44cd2dc71123ee89dc64 Add link to GADT paper re rigid types --- diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 246e8a6..da61c6a 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 case expression, the following rules apply: The type of the scrutinee must be rigid. -The type of the result of the case expression must be rigid. +The type of the entire case expression must be rigid. The type of any free variable mentioned in any of the case alternatives must be rigid. 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 +Simple unification-based type inference for GADTs +. The criteria implemented by GHC are given in the Appendix. +