From: Matthijs Kooijman Date: Tue, 23 Jun 2009 12:41:30 +0000 (+0200) Subject: Make subeverywhere support Cast expressions. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=33a876fcac2c8d455feb5f35131e873e3311800d;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Make subeverywhere support Cast expressions. --- diff --git a/NormalizeTools.hs b/NormalizeTools.hs index c20c583..8e57ba8 100644 --- a/NormalizeTools.hs +++ b/NormalizeTools.hs @@ -147,6 +147,10 @@ subeverywhere trans (Var x) = return $ Var x subeverywhere trans (Lit x) = return $ Lit x subeverywhere trans (Type x) = return $ Type x +subeverywhere trans (Cast expr ty) = do + expr' <- trans expr + return $ Cast expr' ty + subeverywhere trans expr = error $ "NormalizeTools.subeverywhere Unsupported expression: " ++ show expr -- Apply the given transformation to all expressions, except for direct