diff options
author | Joey Hess <joey@kitenet.net> | 2014-05-25 23:03:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-05-25 23:03:44 -0400 |
commit | 5b079262a0ba9387844a1886938133d49d11a8bb (patch) | |
tree | 197c89bf16c1db7325895d22893e83b97d5154fe | |
parent | e53e3d2c78f2cea4a65865847419786b85f21800 (diff) |
put in hack for weird new problem with ghc's emitted splices
-rw-r--r-- | Build/EvilSplicer.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs index bcffa3866..9a7806200 100644 --- a/Build/EvilSplicer.hs +++ b/Build/EvilSplicer.hs @@ -301,6 +301,7 @@ expandExpressionSplice sp lls = concat [before, spliced:padding, end] {- Tweaks code output by GHC in splices to actually build. Yipes. -} mangleCode :: String -> String mangleCode = flip_colon + . remove_weird_string_hash . remove_unnecessary_type_signatures . lambdaparenhack . lambdaparens @@ -549,6 +550,11 @@ mangleCode = flip_colon - The ; is added by case_layout. -} flip_colon = replace "; : _ " "; _ : " + {- Sometimes a string will end with ".."#, and the hash needs to be + - removed. + -} + remove_weird_string_hash = replace "\"#" "#" + {- This works around a problem in the expanded template haskell for Yesod - type-safe url rendering. - |