Haddock fixes
authorsimonpj@microsoft.com <unknown>
Mon, 13 Sep 2010 12:05:10 +0000 (12:05 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 13 Sep 2010 12:05:10 +0000 (12:05 +0000)
compiler/typecheck/TcSimplify.lhs
compiler/types/TyCon.lhs

index 546d96e..535b561 100644 (file)
@@ -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
index b552c24..e7f8507 100644 (file)
@@ -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