Store a SrcSpan instead of a SrcLoc inside a Name
[ghc-hetmet.git] / compiler / typecheck / TcDeriv.lhs
index 58db618..98d7fcf 100644 (file)
@@ -543,7 +543,7 @@ cond_isProduct (gla_exts, rep_tc)
   | isProductTyCon rep_tc = Nothing
   | otherwise            = Just why
   where
-    why = (pprSourceTyCon rep_tc) <+> 
+    why = quotes (pprSourceTyCon rep_tc) <+> 
          ptext SLIT("has more than one constructor")
 
 cond_typeableOK :: Condition
@@ -578,7 +578,7 @@ std_class_via_iso clas      -- These standard classes can be derived for a newtype
 
 
 new_dfun_name clas tycon       -- Just a simple wrapper
-  = newDFunName clas [mkTyConApp tycon []] (getSrcLoc tycon)
+  = newDFunName clas [mkTyConApp tycon []] (getSrcSpan tycon)
        -- The type passed to newDFunName is only used to generate
        -- a suitable string; hence the empty type arg list
 \end{code}
@@ -1122,4 +1122,4 @@ badDerivedPred pred
          nest 2 (ptext SLIT("Offending constraint:") <+> ppr pred)]
 \end{code}
 
\ No newline at end of file