packages feed

graphmod 1.2.5 → 1.2.6

raw patch · 2 files changed

+11/−4 lines, 2 files

Files

graphmod.cabal view
@@ -1,5 +1,5 @@ name:           graphmod-version:        1.2.5+version:        1.2.6 license:        BSD3 license-file:   LICENSE author:         Iavor S. Diatchki
src/Utils.hs view
@@ -20,9 +20,16 @@  -- | Get the imports of a file. parseFile          :: FilePath -> IO (ModName,[ModName])-parseFile f         = (parseString . get_text) `fmap` readFile f-  where get_text txt = if takeExtension f == ".lhs" then delit txt else txt+parseFile f =+  do (modName, imps) <- (parseString . get_text) `fmap` readFile f+     if ext == ".imports"+       then return (splitModName (takeBaseName f), imps)+       else return (modName, imps) ++  where get_text txt = if ext == ".lhs" then delit txt else txt+        ext          = takeExtension f+ -- | Get the imports from a string that represents a program. parseString        :: String -> (ModName,[ModName]) parseString         = parse . dropApproxCPP . lexerPass1@@ -95,7 +102,7 @@   where prefix      = foldr (</>) y xs  suffixes           :: [String]-suffixes            = [".hs",".lhs"]+suffixes            = [".hs",".lhs", ".imports"]  -- | The files in which a module might reside. -- We report only files that exist.