X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=NormalizeTools.hs;h=1785eedc9430b675b7023a7dbf50d45f58d8bab4;hb=8d8e5446f4558cd5bfbd78f3378e6cf96a9c3fc8;hp=f016cfa9fc34684604a8efe487ac8f254297d5c3;hpb=606922724499463248f49b7ea7c5925eacbd0b4b;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/NormalizeTools.hs b/NormalizeTools.hs index f016cfa..1785eed 100644 --- a/NormalizeTools.hs +++ b/NormalizeTools.hs @@ -156,7 +156,7 @@ subeverywhere trans (Cast expr ty) = do expr' <- trans expr return $ Cast expr' ty -subeverywhere trans expr = error $ "NormalizeTools.subeverywhere Unsupported expression: " ++ show expr +subeverywhere trans expr = error $ "\nNormalizeTools.subeverywhere: Unsupported expression: " ++ show expr -- Apply the given transformation to all expressions, except for direct -- arguments of an application @@ -234,5 +234,4 @@ substitute ((b, e):subss) expr = substitute subss' expr' -- Run a given TransformSession. Used mostly to setup the right calls and -- an initial state. runTransformSession :: UniqSupply.UniqSupply -> TransformSession a -> a -runTransformSession uniqSupply session = State.evalState session initState - where initState = TransformState uniqSupply Map.empty VarSet.emptyVarSet +runTransformSession uniqSupply session = State.evalState session (emptyTransformState uniqSupply)