projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
56b37ca
)
do notation for the Maybe monad
author
Norman Ramsey
<nr@eecs.harvard.edu>
Sun, 17 Sep 2006 00:34:10 +0000
(
00:34
+0000)
committer
Norman Ramsey
<nr@eecs.harvard.edu>
Sun, 17 Sep 2006 00:34:10 +0000
(
00:34
+0000)
utils/ghctags/GhcTags.hs
patch
|
blob
|
history
diff --git
a/utils/ghctags/GhcTags.hs
b/utils/ghctags/GhcTags.hs
index
2defe75
..
a011a9d
100644
(file)
--- a/
utils/ghctags/GhcTags.hs
+++ b/
utils/ghctags/GhcTags.hs
@@
-201,12
+201,10
@@
graphData session graph =
where foundthings ms =
let filename = msHsFilePath ms
in do mod <- checkModule session (moduleName $ ms_mod ms)
where foundthings ms =
let filename = msHsFilePath ms
in do mod <- checkModule session (moduleName $ ms_mod ms)
- return $ case mod of
- Nothing -> FileData filename []
- Just m -> case renamedSource m of
- Nothing -> FileData filename []
- Just s -> fileData filename s
-
+ return $ maybe (FileData filename []) id $ do
+ m <- mod
+ s <- renamedSource m
+ return $ fileData filename s
fileData :: FileName -> RenamedSource -> FileData
fileData filename (group, imports, lie) =
fileData :: FileName -> RenamedSource -> FileData
fileData filename (group, imports, lie) =