From a45cf06a9179bab9c6bbc62dab0964e8d325d630 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Sun, 16 Nov 2008 17:49:38 +0000 Subject: [PATCH] Correct an example in the users guide --- docs/users_guide/glasgow_exts.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 393cbf5..2883757 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -2002,9 +2002,9 @@ of the data constructor. For GADTs, the field may mention only types that appear as a simple type-variable argument in the constructor's result type. For example: -data T a where { T1 { f1::a, f2::(a,b) } :: T a } -- b is existential -upd1 t x = t { f1=x } -- OK: upd1 :: T a -> b -> T b -upd2 t x = t { f2=x } -- BAD (f2's type mentions b, which is +data T a b where { T1 { f1::a, f2::b, f3::(b,c) } :: T a b } -- c is existential +upd1 t x = t { f1=x } -- OK: upd1 :: T a b -> a' -> T a' b +upd2 t x = t { f3=x } -- BAD (f3's type mentions c, which is -- existentially quantified) data G a b where { G1 { g1::a, g2::c } :: G a [c] } -- 1.7.10.4