Fixed the mode for printing out the flow-graph
This commit is contained in:
parent
56a701551a
commit
445d45752d
8
Main.hs
8
Main.hs
|
@ -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:"
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user