Improve error messsage when argument count varies
[ghc-hetmet.git] / ghc / compiler / deSugar / Check.lhs
index 309aab2..97b4257 100644 (file)
@@ -18,7 +18,8 @@ import DsUtils                ( EquationInfo(..), MatchResult(..),
 import MatchLit                ( tidyLitPat, tidyNPat )
 import Id              ( Id, idType )
 import DataCon         ( DataCon, dataConTyCon, dataConOrigArgTys, dataConFieldLabels )
-import Name             ( Name, mkInternalName, getOccName, isDataSymOcc, getName, mkVarOcc )
+import Name             ( Name, mkInternalName, getOccName, isDataSymOcc,
+                         getName, mkVarOccFS )
 import TysWiredIn
 import PrelNames       ( unboundKey )
 import TyCon            ( tyConDataCons, tupleTyConBoxity, isTupleTyCon )
@@ -146,7 +147,7 @@ untidy b (L loc p) = L loc (untidy' b p)
     untidy' _ (ListPat pats ty)      = ListPat (map untidy_no_pars pats) ty
     untidy' _ (TuplePat pats boxed)  = TuplePat (map untidy_no_pars pats) boxed
     untidy' _ (PArrPat _ _)         = panic "Check.untidy: Shouldn't get a parallel array here!"
-    untidy' _ (SigPatIn _ _)   = panic "Check.untidy: SigPat"
+    untidy' _ (SigPatIn _ _)        = panic "Check.untidy: SigPat"
 
 untidy_con (PrefixCon pats) = PrefixCon (map untidy_pars pats) 
 untidy_con (InfixCon p1 p2) = InfixCon  (untidy_pars p1) (untidy_pars p2)
@@ -382,7 +383,7 @@ make_row_vars used_lits (_, EqnInfo { eqn_pats = pats})
      new_var = hash_x
 
 hash_x = mkInternalName unboundKey {- doesn't matter much -}
-                    (mkVarOcc FSLIT("#x"))
+                    (mkVarOccFS FSLIT("#x"))
                     noSrcLoc
 
 make_row_vars_for_constructor :: (EqnNo, EquationInfo) -> [WarningPat]