Fix Trac #3823, plus warning police in TcRnDriver
[ghc-hetmet.git] / compiler / typecheck / TcTyClsDecls.lhs
index 049276d..9c3abc5 100644 (file)
@@ -37,7 +37,6 @@ import VarSet
 import Name
 import Outputable
 import Maybes
-import Monad
 import Unify
 import Util
 import SrcLoc
@@ -49,6 +48,7 @@ import Unique         ( mkBuiltinUnique )
 import BasicTypes
 
 import Bag
+import Control.Monad
 import Data.List
 \end{code}
 
@@ -249,8 +249,8 @@ tcFamInstDecl (L loc decl)
   =    -- Prime error recovery, set source location
     setSrcSpan loc                             $
     tcAddDeclCtxt decl                         $
-    do { -- type families require -XTypeFamilies and can't be in an
-        -- hs-boot file
+    do { -- type family instances require -XTypeFamilies
+        -- and can't (currently) be in an hs-boot file
        ; type_families <- doptM Opt_TypeFamilies
        ; is_boot  <- tcIsHsBoot          -- Are we compiling an hs-boot file?
        ; checkTc type_families $ badFamInstDecl (tcdLName decl)
@@ -1269,7 +1269,7 @@ mkRecSelBind (tycon, sel_name)
                         || dataConCannotMatch inst_tys con)
     inst_tys = tyConAppArgs data_ty
 
-    unit_rhs = L loc $ ExplicitTuple [] Boxed
+    unit_rhs = mkLHsTupleExpr []
     msg_lit = HsStringPrim $ mkFastString $ 
               occNameString (getOccName sel_name)