From ba13052d3117c3931a5477a0bbf2d3c38ed749c6 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 6 Apr 2010 08:53:44 +0000 Subject: dependency graph can be restricted to some modules; added help dg --- src/compiler/GFI.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/compiler/GFI.hs') diff --git a/src/compiler/GFI.hs b/src/compiler/GFI.hs index e80403145..9561c407f 100644 --- a/src/compiler/GFI.hs +++ b/src/compiler/GFI.hs @@ -7,6 +7,7 @@ import GF.Command.Commands import GF.Command.Abstract import GF.Command.Parse import GF.Data.ErrM +import GF.Data.Operations (chunks) import GF.Grammar hiding (Ident) import GF.Grammar.Parser (runP, pExp) import GF.Grammar.ShowTerm @@ -133,7 +134,10 @@ loop opts gfenv0 = do Bad s -> putStrLn $ enc s loopNewCPU gfenv "dg":ws -> do - writeFile "_gfdepgraph.dot" (depGraph sgr) + let stop = case ws of + ('-':'o':'n':'l':'y':'=':fs):_ -> Just $ chunks ',' fs + _ -> Nothing + writeFile "_gfdepgraph.dot" (depGraph stop sgr) putStrLn "wrote graph in file _gfdepgraph.dot" loopNewCPU gfenv "eh":w:_ -> do -- cgit v1.2.3