X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=NormalizeTools.hs;h=8e57ba8f2ec2446301ebcf22ec83e03f577470b7;hb=3ad8feb4ca1eecfb53bed973d7e0f1c3b4145d0f;hp=c20c58349491ee5aa75a5fe8348fe1fa4623ca13;hpb=d88c25bace830adf56cc5a3978b39aaf603353d3;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git 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