projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve External Core syntax
[ghc-hetmet.git]
/
utils
/
ext-core
/
ParseGlue.hs
diff --git
a/utils/ext-core/ParseGlue.hs
b/utils/ext-core/ParseGlue.hs
index
7335656
..
2e196c0
100644
(file)
--- a/
utils/ext-core/ParseGlue.hs
+++ b/
utils/ext-core/ParseGlue.hs
@@
-64,7
+64,14
@@
data Token =
-- ugh
splitModuleName mn =
let decoded = zDecodeString mn
-- ugh
splitModuleName mn =
let decoded = zDecodeString mn
- parts = filter (notElem '.') $ groupBy
+ -- Triple ugh.
+ -- We re-encode the individual parts so that:
+ -- main:Foo_Bar.Quux.baz
+ -- prints as:
+ -- main:FoozuBarziQuux.baz
+ -- and not:
+ -- main:Foo_BarziQuux.baz
+ parts = map zEncodeString $ filter (notElem '.') $ groupBy
(\ c1 c2 -> c1 /= '.' && c2 /= '.')
decoded in
(take (length parts - 1) parts, last parts)
(\ c1 c2 -> c1 /= '.' && c2 /= '.')
decoded in
(take (length parts - 1) parts, last parts)