[project @ 1997-09-04 20:21:37 by sof]
[ghc-hetmet.git] / ghc / compiler / deSugar / MatchCon.lhs
index c94ce52..d572e60 100644 (file)
@@ -9,7 +9,11 @@
 module MatchCon ( matchConFamily ) where
 
 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