[project @ 1997-09-09 18:04:55 by sof]
[ghc-hetmet.git] / ghc / compiler / deSugar / MatchCon.lhs
index 11dbd1d..d572e60 100644 (file)
@@ -8,8 +8,12 @@
 
 module MatchCon ( matchConFamily ) where
 
-import Ubiq
-import DsLoop          ( match )       -- break match-ish loop
+IMP_Ubiq()
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
+IMPORT_DELOOPER(DsLoop)                ( match )       -- break match-ish loop
+#else
+import {-# SOURCE #-} Match
+#endif
 
 import HsSyn           ( OutPat(..), HsLit, HsExpr )
 import DsHsSyn         ( outPatType )
@@ -17,7 +21,7 @@ import DsHsSyn                ( outPatType )
 import DsMonad
 import DsUtils
 
-import Id              ( isDataCon, GenId{-instances-} )
+import Id              ( GenId{-instances-}, SYN_IE(Id) )
 import Util            ( panic, assertPanic )
 \end{code}
 
@@ -89,8 +93,7 @@ Wadler's chapter in SLPJ.
 match_cons_used _ [{- no more eqns -}] _ = returnDs []
 
 match_cons_used vars eqns_info@(EqnInfo (ConPat data_con _ arg_pats : ps1) _ : eqns) shadows
-  = ASSERT(isDataCon data_con)
-    let
+  = let
        (eqns_for_this_con, eqns_not_for_this_con)       = splitByCon eqns_info
        (shadows_for_this_con, shadows_not_for_this_con) = splitByCon shadows
     in