Language.Haskell.GhcMod.HomeModuleGraph

ghc-mod-5.5.0.0: Happy Haskell Programming

Safe Haskell | None
Language | Haskell2010

Language.Haskell.GhcMod.HomeModuleGraph

Synopsis

- data GmModuleGraph = GmModuleGraph {
  - gmgGraph :: Map ModulePath (Set ModulePath)
  }
- data ModulePath = ModulePath {
  - mpModule :: ModuleName
  - mpPath :: FilePath
  }
- mkFileMap :: Set ModulePath -> Map FilePath ModulePath
- mkModuleMap :: Set ModulePath -> Map ModuleName ModulePath
- mkMainModulePath :: FilePath -> ModulePath
- findModulePath :: HscEnv -> ModuleName -> IO (Maybe ModulePath)
- findModulePathSet :: HscEnv -> [ModuleName] -> IO (Set ModulePath)
- fileModuleName :: (IOish m, GmEnv m, GmState m) => HscEnv -> FilePath -> m (Either [String] (Maybe ModuleName))
- canonicalizeModulePath :: ModulePath -> IO ModulePath
- homeModuleGraph :: (IOish m, Gm m) => HscEnv -> Set ModulePath -> m GmModuleGraph
- updateHomeModuleGraph :: (IOish m, Gm m) => HscEnv -> GmModuleGraph -> Set ModulePath -> Set ModulePath -> m GmModuleGraph
- canonicalizeModuleGraph :: MonadIO m => GmModuleGraph -> m GmModuleGraph
- reachable :: Set ModulePath -> GmModuleGraph -> Set ModulePath
- moduleGraphToDot :: GmModuleGraph -> String

# Documentation

data GmModuleGraph

Constructors

GmModuleGraph |
Fields gmgGraph :: Map ModulePath (Set ModulePath)

Instances

Eq GmModuleGraph |
Ord GmModuleGraph |
Read GmModuleGraph |
Show GmModuleGraph |
Generic GmModuleGraph |
Binary GmModuleGraph |
Monoid GmModuleGraph |
type Rep GmModuleGraph |

data ModulePath

Constructors

ModulePath |
Fields mpModule :: ModuleName mpPath :: FilePath

Instances

Eq ModulePath |
Ord ModulePath |
Read ModulePath |
Show ModulePath |
Generic ModulePath |
Binary ModulePath |
type Rep ModulePath |

mkFileMap :: Set ModulePath -> Map FilePath ModulePath

mkModuleMap :: Set ModulePath -> Map ModuleName ModulePath

mkMainModulePath :: FilePath -> ModulePath

findModulePath :: HscEnv -> ModuleName -> IO (Maybe ModulePath)

findModulePathSet :: HscEnv -> [ModuleName] -> IO (Set ModulePath)

fileModuleName :: (IOish m, GmEnv m, GmState m) => HscEnv -> FilePath -> m (Either [String] (Maybe ModuleName))

canonicalizeModulePath :: ModulePath -> IO ModulePath

homeModuleGraph :: (IOish m, Gm m) => HscEnv -> Set ModulePath -> m GmModuleGraph

updateHomeModuleGraph

Arguments

:: (IOish m, Gm m) |
=> HscEnv |
-> GmModuleGraph |
-> Set ModulePath | Initial set of modules
-> Set ModulePath | Updated set of modules
-> m GmModuleGraph |

canonicalizeModuleGraph :: MonadIO m => GmModuleGraph -> m GmModuleGraph

reachable :: Set ModulePath -> GmModuleGraph -> Set ModulePath

moduleGraphToDot :: GmModuleGraph -> String

Turn module graph into a graphviz dot file

    dot -Tpng -o modules.png modules.dot