import Unique
import UniqFM
import UniqSet
-import Util ( singleton )
+import Util
import Digraph ( SCC(..), stronglyConnComp )
import Outputable
vectTyConDecls :: [TyCon] -> VM [TyCon]
vectTyConDecls tcs = fixV $ \tcs' ->
do
- mapM_ (uncurry defTyCon) (lazy_zip tcs tcs')
+ mapM_ (uncurry defTyCon) (zipLazy tcs tcs')
mapM vectTyConDecl tcs
- where
- lazy_zip [] _ = []
- lazy_zip (x:xs) ~(y:ys) = (x,y) : lazy_zip xs ys
vectTyConDecl :: TyCon -> VM TyCon
vectTyConDecl tc
from_repr _ _ _ _ _ _ = panic "buildFromArrPRepr/from_repr"
- from_prod prod@(ProdRepr { prod_components = tys
- , prod_arr_tycon = tycon
- , prod_arr_data_con = data_con })
+ from_prod (ProdRepr { prod_components = tys
+ , prod_arr_tycon = tycon
+ , prod_arr_data_con = data_con })
expr
shape_vars
repr_vars
= do
let scrut = unwrapFamInstScrut tycon tys expr
scrut_ty = mkTyConApp tycon tys
- _ty <- arrReprType prod
return $ Case scrut (mkWildId scrut_ty) res_ty
[(DataAlt data_con, shape_vars ++ repr_vars, body)]