small patch for HsLexer.lhs in hdoc 0.8.2

Martin Norbäck martin.norback@safelogic.se
16 May 2002 14:20:10 +0200


--=-/yttl8FmcLM+fjaXBWA+
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the new version of hdoc!

I've found one bug in the HsLexer.lhs file (which was introduced with
the new stuff from hsparser I think). I gets the source location all
mixed up when character literals are present.

It seems the same bug is present in the new Language:Haskell.Lexer so I
send this to libraries@haskell.org as well. Even though the patch
doesn't apply automatically there, it should be easy to apply by hand.

The patch is attached.

Regards,

	Martin

--=20
Martin Norb=E4ck                         Safelogic AB
martin.norback@safelogic.se            Stena Center 1C
+46 (0)31 772 81 70                    S-412 92 G=D6TEBORG
http://www.safelogic.se                SWEDEN

--=-/yttl8FmcLM+fjaXBWA+
Content-Disposition: attachment; filename=hslexer.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=hslexer.patch; charset=ISO-8859-1

--- /home/martin/hdoc-0.8.2/hsparser/HsLexer.lhs	Sat May 11 19:20:29 2002
+++ HsLexer.lhs	Thu May 16 14:00:19 2002
@@ -378,7 +378,7 @@
                      c:s    -> charEnd c s loc y (x+1)
                      []     -> error "Internal error: lexChar"
=20
-  where charEnd c ('\'':s) =3D \loc x -> cont (Character c) s loc (x+1)
+  where charEnd c ('\'':s) =3D \loc y x -> cont (Character c) s loc y (x+1=
)
         charEnd c s =3D parseError "Improperly terminated character consta=
nt" s
=20
 lexString :: (Token -> P a) -> P a

--=-/yttl8FmcLM+fjaXBWA+--