From 56a437ee698c5a46864e7fcc530707742589ef7d Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Mon, 13 Sep 2010 12:05:10 +0000 Subject: [PATCH] Haddock fixes --- compiler/typecheck/TcSimplify.lhs | 2 +- compiler/types/TyCon.lhs | 33 ++++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs index 546d96e..535b561 100644 --- a/compiler/typecheck/TcSimplify.lhs +++ b/compiler/typecheck/TcSimplify.lhs @@ -816,7 +816,7 @@ findDefaultableGroups (ctxt, default_tys, (ovl_strings, extended_defaults)) | otherwise = filter is_defaultable_group (equivClasses cmp_tv unaries) where unaries :: [(CanonicalCt, TcTyVar)] -- (C tv) constraints - non_unaries :: [CanonicalCt] -- *other* constraints + non_unaries :: [CanonicalCt] -- and *other* constraints (unaries, non_unaries) = partitionWith find_unary (bagToList wanteds) -- Finds unary type-class constraints diff --git a/compiler/types/TyCon.lhs b/compiler/types/TyCon.lhs index b552c24..e7f8507 100644 --- a/compiler/types/TyCon.lhs +++ b/compiler/types/TyCon.lhs @@ -500,7 +500,24 @@ data TyConParent -- | An *associated* type of a class. | AssocFamilyTyCon - Class -- The class in whose declaration the family is declared + Class -- The class in whose declaration the family is declared + -- The 'tyConTyVars' of this 'TyCon' may mention some + -- of the same type variables as the classTyVars of the + -- parent 'Class'. E.g. + -- + -- @ + -- class C a b where + -- data T c a + -- @ + -- + -- Here the 'a' is shared with the 'Class', and that is + -- important. In an instance declaration we expect the + -- two to be instantiated the same way. Eg. + -- + -- @ + -- instanc C [x] (Tree y) where + -- data T c [x] = T1 x | T2 c + -- @ -- | Type constructors representing an instance of a type family. Parameters: -- @@ -539,12 +556,14 @@ isNoParent _ = False -- | Information pertaining to the expansion of a type synonym (@type@) data SynTyConRhs - = SynonymTyCon -- ^ An ordinary type synony - Type -- ^ The rhs, which mentions head type variables. It acts as a - -- template for the expansion when the 'TyCon' is applied to some - -- types. - - | SynFamilyTyCon -- A type synonym family e.g. type family F x y :: * -> * + = -- | An ordinary type synonyn. + SynonymTyCon + Type -- This 'Type' is the rhs, and may mention from 'tyConTyVars'. + -- It acts as a template for the expansion when the 'TyCon' + -- is applied to some types. + + -- | A type synonym family e.g. @type family F x y :: * -> *@ + | SynFamilyTyCon -------------------- data CoTyConDesc -- 1.7.10.4