Fixed the mode for printing out the flow-graph

This commit is contained in:
Neil Brown 2008-02-05 22:36:37 +00:00
parent 56a701551a
commit 445d45752d
2 changed files with 3 additions and 7 deletions

View File

@ -261,11 +261,9 @@ compile mode fn outHandle
do procs <- findAllProcesses
let fs :: Data t => t -> PassM String
fs = ((liftM $ (take 20) . (filter ((/=) '\"'))) . pshowCode)
-- TODO fix this mode
{-
let labelFuncs = mkLabelFuncsGeneric fs
graphs <- mapM
((liftM $ either (const Nothing) Just) . (buildFlowGraph labelFuncs) )
((liftM $ either (const Nothing) Just) . (buildFlowGraphP labelFuncs) )
(map (A.Only emptyMeta) (snd $ unzip $ procs))
@ -273,11 +271,9 @@ compile mode fn outHandle
-- since it is never used. Then we used graphsTyped (rather than graphs)
-- to prevent a compiler warning at graphsTyped being unused;
-- graphs is of course identical to graphsTyped, as you can see here:
let (graphsTyped :: [Maybe (FlowGraph Identity String)]) = map (transformMaybe fst) graphs
let (graphsTyped :: [Maybe (FlowGraph' Identity String A.Process)]) = map (transformMaybe fst) graphs
--TODO output each process to a separate file, rather than just taking the first:
return $ head $ map makeFlowGraphInstr (catMaybes graphsTyped)
-}
return ""
ModeCompile ->
do progress "Passes:"

View File

@ -148,7 +148,7 @@ makeTestNode :: Monad m => Meta -> a -> FNode m a
makeTestNode m d = Node (m,d,undefined)
-- | Builds the instructions to send to GraphViz
makeFlowGraphInstr :: (Monad m, Show a) => FlowGraph m a -> String
makeFlowGraphInstr :: (Monad m, Show a, Data b) => FlowGraph' m a b -> String
makeFlowGraphInstr = graphviz'
-- | Joins two labelling functions together. They must use the same monad.