diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,12 @@
+** 1.9.x
+
+1.9.5 --> 1.9.6
+===============
+
+* Fix a bug (#203) where the lexer loops on malformed quasi-quoters.
+
+* Fix a bug with pretty-printing RULES pragmas.
+
 1.9.4 --> 1.9.5
 ===============
 
@@ -7,8 +16,6 @@
 * Pretty-printing patterns is now more accurate in inserting (and not
   inserting) parentheses when needed.
 
-** 1.9.x
-
 1.9.3 --> 1.9.4
 ===============
 
@@ -44,7 +51,6 @@
 
 * Export parseFileContentsWithExts from .Exts.
 
-
 1.8.2 --> 1.9.0
 ===============
 
@@ -58,6 +64,7 @@
   to L.H.Exts .
 
 * More informative error messages when HSX tags are mismatched.
+
 
 
 ** 1.8.x
diff --git a/haskell-src-exts.cabal b/haskell-src-exts.cabal
--- a/haskell-src-exts.cabal
+++ b/haskell-src-exts.cabal
@@ -1,5 +1,5 @@
 Name:                   haskell-src-exts
-Version:                1.9.5
+Version:                1.9.6
 License:                BSD3
 License-File:           LICENSE
 Author:                 Niklas Broberg
diff --git a/src/Language/Haskell/Exts/Lexer.hs b/src/Language/Haskell/Exts/Lexer.hs
--- a/src/Language/Haskell/Exts/Lexer.hs
+++ b/src/Language/Haskell/Exts/Lexer.hs
@@ -764,6 +764,7 @@
                   '\n':_ -> do lexNewline
                                str <- lexQQBody
                                return ('\n':str)
+                  []     -> fail "Unexpected end of input while lexing quasi-quoter"
                   _ -> do str <- lexWhile (not . (`elem` "\\|\n"))
                           rest <- lexQQBody
                           return (str++rest)
diff --git a/src/Language/Haskell/Exts/Pretty.hs b/src/Language/Haskell/Exts/Pretty.hs
--- a/src/Language/Haskell/Exts/Pretty.hs
+++ b/src/Language/Haskell/Exts/Pretty.hs
@@ -613,7 +613,7 @@
 
 instance Pretty RuleVar where
     pretty (RuleVar n) = pretty n
-    pretty (TypedRuleVar n t) = mySep [pretty n, text "::", pretty t]
+    pretty (TypedRuleVar n t) = parens $ mySep [pretty n, text "::", pretty t]
 
 instance Pretty ModulePragma where
     pretty (LanguagePragma _ ns) =
