> mapArgs (\e -> tran sw p t e []) as `thenUs` \as ->
> returnUs (mkGenApp (SCC l e) as)
>
+> tran sw p t (Coerce c ty e) as =
+> panic "DefExpr:tran:Coerce"
+>
> tran sw p t (Case e ps) as =
> tranCase sw p t e [] ps as
>
> returnUs (Case (mkGenApp (SCC l e) bs)
> ps)
>
+> Coerce _ _ _ -> panic "DefExpr:tranCase:Coerce"
+>
> Case e ps' ->
> tranCase sw p t e []
> (mapAlts (\e -> mkGenApp (Case e ps) bs) ps') as
> Let (Rec (map substTyRecBind bs)) (substTy e)
> where substTyRecBind (v,e) = (applyTypeEnvToId p v, substTy e)
> SCC l e -> SCC l (substTy e)
+> Coerce _ _ _ -> panic "DefExpr:applyTypeEnvToExpr:Coerce"
> substTyAtom :: DefAtom -> DefAtom
> substTyAtom (VarArg v) = VarArg (substTyArg v)