X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=9da32531654db5d8ee961a820e17a2bdc0b91786;hb=5892af0e08fdb890b5a0b9a64346d9f7773a6ed8;hp=393cbf50ac297252e7f2cc1cc0b71781a1d2f3ea;hpb=9bcd95bad83ee937c178970e8b729732e680fe1e;p=ghc-hetmet.git diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 393cbf5..9da3253 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -1232,7 +1232,7 @@ it is not clear which of the two types is intended. Haskell 98 regards all four as ambiguous, but with the - flag, GHC will accept + flag, GHC will accept the former two. The rules are precisely the same as those for instance declarations in Haskell 98, where the method names on the left-hand side of the method bindings in an instance declaration refer unambiguously @@ -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] }