From 0b2c6f7cb6a15bfcc32e3ca729a10a47d9d21be1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 3 Nov 2003 17:24:41 +0000 Subject: [PATCH] [project @ 2003-11-03 17:24:41 by simonmar] Remove references to Haskell 1.4, replace with up to date Haskell 98 references. Includes removing a comment about the fact that Haskell 1.4 didn't have principle types (Haskell 98 fixed that bug). --- ghc/docs/users_guide/glasgow_exts.sgml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ghc/docs/users_guide/glasgow_exts.sgml b/ghc/docs/users_guide/glasgow_exts.sgml index 63fd927..5280bcd 100644 --- a/ghc/docs/users_guide/glasgow_exts.sgml +++ b/ghc/docs/users_guide/glasgow_exts.sgml @@ -1435,14 +1435,14 @@ With the GHC lifts this restriction. The context of a type signature -Unlike Haskell 1.4, constraints in types do not have to be of -the form (class type-variables). Thus, these type signatures -are perfectly OK +Unlike Haskell 98, constraints in types do not have to be of +the form (class type-variable) or +(class (type-variable type-variable ...)). Thus, +these type signatures are perfectly OK - f :: Eq (m a) => [m a] -> [m a] g :: Eq [a] => ... + g :: Ord (T a ()) => ... -This choice recovers principal types, a property that Haskell 1.4 does not have. GHC imposes the following restrictions on the constraints in a type signature. @@ -1453,7 +1453,7 @@ Consider the type: (Here, we write the "foralls" explicitly, although the Haskell source -language omits them; in Haskell 1.4, all the free type variables of an +language omits them; in Haskell 98, all the free type variables of an explicit source-language type signature are universally quantified, except for the class type variables in a class declaration. However, in GHC, you can give the foralls if you want. See ). @@ -1684,7 +1684,7 @@ change that decision, at least for Main.) Type synonyms in the instance head -Unlike Haskell 1.4, instance heads may use type +Unlike Haskell 98, instance heads may use type synonyms. (The instance "head" is the bit after the "=>" in an instance decl.) As always, using a type synonym is just shorthand for writing the RHS of the type synonym definition. For example: -- 1.7.10.4