aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Lex.x
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-10-27 11:09:44 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-10-27 11:09:44 +0000
commit6cad3e8c495cb6b6630c6962a5e8c6673d095a2b (patch)
tree80a0e149ad971af050dcf3778e8ed83729d9b182 /src/Haddock/Lex.x
parent985c84aa4fe1422d211254c1a484c66f12a87a9e (diff)
follow changes in the GHC API
Diffstat (limited to 'src/Haddock/Lex.x')
-rw-r--r--src/Haddock/Lex.x4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Haddock/Lex.x b/src/Haddock/Lex.x
index 4f877fc9..75d44fff 100644
--- a/src/Haddock/Lex.x
+++ b/src/Haddock/Lex.x
@@ -184,7 +184,11 @@ ident pos str sc cont dflags =
strToHsQNames :: DynFlags -> String -> Maybe [RdrName]
strToHsQNames dflags str0 =
+#if MIN_VERSION_ghc(7,1,0)
+ let buffer = stringToStringBuffer str0
+#else
let buffer = unsafePerformIO (stringToStringBuffer str0)
+#endif
#if MIN_VERSION_ghc(6,13,0)
pstate = mkPState dflags buffer noSrcLoc
#else