From 86ee2412abacff33340559f2f4626ea44564a038 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sat, 8 Nov 2014 11:32:42 +0800 Subject: Minor code simplification --- haddock-library/src/Documentation/Haddock/Parser.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/haddock-library/src/Documentation/Haddock/Parser.hs b/haddock-library/src/Documentation/Haddock/Parser.hs index bea1803a..b3387f57 100644 --- a/haddock-library/src/Documentation/Haddock/Parser.hs +++ b/haddock-library/src/Documentation/Haddock/Parser.hs @@ -514,11 +514,10 @@ parseValid = p some p p' = do vs' <- p' $ utf8String "⋆" <|> return <$> idChar let vs = concat vs' - c <- peekChar + c <- peekChar' case c of - Just '`' -> return vs - Just '\'' -> (\x -> vs ++ "'" ++ x) <$> ("'" *> p many') - <|> return vs + '`' -> return vs + '\'' -> (\x -> vs ++ "'" ++ x) <$> ("'" *> p many') <|> return vs _ -> fail "outofvalid" -- | Parses UTF8 strings from ByteString streams. -- cgit v1.2.3