X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fext-core%2FParseGlue.hs;h=2e196c071e3a0e7ab83b1b9a1a39446ba0751aaa;hb=2ad4df602e5bb2cff0315b945fa3201749878c30;hp=7335656b17eaeaca2b470d87a2ba18fc4c786c86;hpb=6b085eeada6c3c93599fa4b6d77572abc419c08c;p=ghc-hetmet.git diff --git a/utils/ext-core/ParseGlue.hs b/utils/ext-core/ParseGlue.hs index 7335656..2e196c0 100644 --- 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 - 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)