Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
Add comments.
Browse files Browse the repository at this point in the history
See #210.
  • Loading branch information
snowleopard committed Feb 19, 2016
1 parent 57c623d commit e1d05c5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Oracles/ModuleFiles.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ haskellModuleFiles stage pkg = do

return (haskellFiles, missingMods ++ map otherFileToMod otherFiles)

-- | This is an important oracle whose role is to find and cache module source
-- files. More specifically, it takes a list of module names @modules@ and a
-- list of directories @dirs@ as arguments, and computes a sorted list of pairs
-- of the form @(A.B.C, dir/A/B/C.extension)@, such that @A.B.C@ belongs to
-- @modules@, @dir@ belongs to @dirs@, and file @dir/A/B/C.extension@ exists.
-- For example, for 'compiler' package given
-- @modules = ["CodeGen.Platform.ARM", "Lexer"]@, and
-- @dirs = ["codeGen", "parser"]@, it produces
-- @[("CodeGen.Platform.ARM", "codeGen/CodeGen/Platform/ARM.hs"),
-- ("Lexer", "parser/Lexer.x")]@.
moduleFilesOracle :: Rules ()
moduleFilesOracle = void $
addOracle $ \(ModuleFilesKey (modules, dirs)) -> do
Expand Down

0 comments on commit e1d05c5

Please sign in to comment.