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 )
import DsMonad
import DsUtils
-import Id ( isDataCon, GenId{-instances-} )
+import Id ( GenId{-instances-}, SYN_IE(Id) )
import Util ( panic, assertPanic )
\end{code}
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