From 0a7d81c6f5a289bd8ade44cd2dc71123ee89dc64 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Tue, 16 Sep 2008 09:45:21 +0000 Subject: [PATCH] Add link to GADT paper re rigid types --- docs/users_guide/glasgow_exts.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. + -- 1.7.10.4