For the record, here's the final improved version: float' :: TokenParser st -> GenParser Char st Double float' t = do n <- liftCtoS '-' w <- many1 digit char '.' f <- many1 digit e <- option "" $ do char 'e' n' <- liftCtoS '-' m <- many1 digit return $ concat ["e", n', m] whiteSpace t return $ read $ concat [n, w, ".", f, e] where liftCtoS a = option "" (char a >> return [a])
Thanks for all the help, again. -Andy -- Andy Gimblett http://gimbo.org.uk/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe