+linkAlgCase ie ce bndr expr alts dflt con
+ = do expr <- linkIExpr ie ce expr
+ alts <- mapM (linkAlgAlt ie ce) alts
+ dflt <- linkDefault ie ce dflt
+ return (con bndr expr alts dflt)
+
+linkPrimCase ie ce bndr expr alts dflt con
+ = do expr <- linkIExpr ie ce expr
+ alts <- mapM (linkPrimAlt ie ce) alts
+ dflt <- linkDefault ie ce dflt
+ return (con bndr expr alts dflt)
+
+linkAlgAlt ie ce (AltAlg tag args rhs)
+ = do rhs <- linkIExpr ie ce rhs
+ return (AltAlg tag args rhs)
+
+linkPrimAlt ie ce (AltPrim lit rhs)
+ = do rhs <- linkIExpr ie ce rhs
+ lit <- linkIExpr ie ce lit
+ return (AltPrim lit rhs)
+
+linkDefault ie ce Nothing = return Nothing
+linkDefault ie ce (Just expr)
+ = do expr <- linkIExpr ie ce expr
+ return (Just expr)
+
+linkNonRec ie ce con bind expr
+ = do expr <- linkIExpr ie ce expr
+ bind <- linkIBind ie ce bind
+ return (con bind expr)
+
+linkRec ie ce con binds expr
+ = do expr <- linkIExpr ie ce expr
+ binds <- linkIBinds ie ce binds
+ return (con binds expr)
+
+linkLam ie ce con bndr expr
+ = do expr <- linkIExpr ie ce expr
+ return (con bndr expr)
+
+linkApp ie ce con fun arg
+ = do fun <- linkIExpr ie ce fun
+ arg <- linkIExpr ie ce arg
+ return (con fun arg)
+
+linkPrimOp ie ce con op args
+ = do args <- mapM (linkIExpr ie ce) args
+ return (con op args)
+