Layout and type synonyms only
[ghc-hetmet.git] / compiler / hsSyn / HsBinds.lhs
index b8501d7..86622be 100644 (file)
@@ -131,8 +131,9 @@ data HsBindLR idL idR
     }
 
   | AbsBinds {                                 -- Binds abstraction; TRANSLATION
-       abs_tvs     :: [TyVar],  
-       abs_dicts   :: [DictId],
+        abs_tvs     :: [TyVar],  
+       abs_dicts   :: [DictId],                -- Includes equality constraints
+
        -- AbsBinds only gets used when idL = idR after renaming,
        -- but these need to be idL's for the collect... code in HsUtil to have
        -- the right type
@@ -340,8 +341,12 @@ data HsWrapper
   | WpCast Coercion            -- A cast:  [] `cast` co
                                -- Guaranteed not the identity coercion
 
-  | WpApp Var                  -- [] d         the 'd' is a type-class dictionary
+  | WpApp Var                  -- [] d         the 'd' is a type-class dictionary or coercion variable
+
   | WpTyApp Type               -- [] t         the 't' is a type or corecion
+                               --      ToDo: it'd be tidier if 't' was always a type (not coercion),
+                               --            but that is inconvenient in Inst.instCallDicts
+
   | WpLam Var                  -- \d. []       the 'd' is a type-class dictionary or coercion variable
   | WpTyLam TyVar              -- \a. []       the 'a' is a type variable (not coercion var)
   | WpInline                   -- inline_me []   Wrap inline around the thing
@@ -379,13 +384,13 @@ c1 <.> c2    = c1 `WpCompose` c2
 mkWpTyApps :: [Type] -> HsWrapper
 mkWpTyApps tys = mk_co_fn WpTyApp (reverse tys)
 
-mkWpApps :: [Id] -> HsWrapper
+mkWpApps :: [Var] -> HsWrapper
 mkWpApps ids = mk_co_fn WpApp (reverse ids)
 
 mkWpTyLams :: [TyVar] -> HsWrapper
 mkWpTyLams ids = mk_co_fn WpTyLam ids
 
-mkWpLams :: [Id] -> HsWrapper
+mkWpLams :: [Var] -> HsWrapper
 mkWpLams ids = mk_co_fn WpLam ids
 
 mk_co_fn :: (a -> HsWrapper) -> [a] -> HsWrapper