Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/Graphmod.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ graph opts inputs = fmap maybePrune $ mfix $ \ ~(_,mods) ->
Nothing -> aes
Just nTo ->
case impType i of
SourceImp ->
SourceImp | seperate_boot opts ->
aes { sourceEdges = insSet nFrom nTo (sourceEdges aes) }
NormalImp ->
_ ->
aes { normalEdges = insSet nFrom nTo (normalEdges aes) }


Expand Down Expand Up @@ -489,6 +489,7 @@ data Opts = Opts
, graph_size :: String

, use_cabal :: Bool -- ^ should we try to use a cabal file, if any
, seperate_boot :: Bool
}

type IgnoreSet = Trie.Trie String IgnoreSpec
Expand All @@ -510,6 +511,7 @@ default_opts = Opts
, prune_edges = False
, graph_size = "6,4"
, use_cabal = True
, seperate_boot = True
}

options :: [OptDescr OptT]
Expand Down Expand Up @@ -555,6 +557,9 @@ options =

, Option ['v'] ["version"] (NoArg set_show_version)
"Show the current version."

, Option [] ["merge-boot"] (NoArg set_seperate_boot)
"Treat hs-boot imports like normal imports."
]

add_current :: OptT
Expand All @@ -568,6 +573,9 @@ set_quiet o = o { quiet = True }
set_show_version :: OptT
set_show_version o = o { show_version = True }

set_seperate_boot :: OptT
set_seperate_boot o = o { seperate_boot = False }

set_all :: OptT
set_all o = o { with_missing = True }

Expand Down