X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FDataflow.hs;h=81934bcb25e2f598c891edde99af78735eea3b45;hb=c6453def7dcfd8bd9468f488edef6083d37eec87;hp=6c54f73fc2689c55b8cb995d4ee19da52fb50f07;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/cmm/Dataflow.hs b/compiler/cmm/Dataflow.hs index 6c54f73..81934bc 100644 --- a/compiler/cmm/Dataflow.hs +++ b/compiler/cmm/Dataflow.hs @@ -1,9 +1,4 @@ -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings --- for details +{-# OPTIONS -Wall -fno-warn-name-shadowing #-} module Dataflow ( fixedpoint @@ -29,10 +24,10 @@ module Dataflow ( -- that is H*E. The N term of the complexity is from the initial call -- when 'update' will be passed 'Nothing'. fixedpoint :: - (node -> [node]) -- ^ map from nodes to those who's + (node -> [node]) -- map from nodes to those who's -- value depend on the argument node -> (node -> Maybe node -> s -> Maybe s) - -- ^ Given the node which needs to be + -- Given the node which needs to be -- updated, and which node caused that node -- to need to be updated, update the state. -- @@ -42,13 +37,13 @@ fixedpoint :: -- Must return 'Nothing' if no change, -- otherwise returrn 'Just' of the new state. - -> [node] -- ^ Nodes that should initially be updated + -> [node] -- Nodes that should initially be updated - -> s -- ^ Initial state + -> s -- Initial state -- (usually a map from node to -- the value for that node) - -> s -- ^ Final state + -> s -- Final state fixedpoint dependants update nodes state = foldr (fixedpoint' Nothing) state nodes where -- Use a depth first traversal of nodes based on the update graph.