diff options
author | Simon Hengel <sol@typeful.net> | 2014-11-08 11:32:42 +0800 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2014-11-08 11:32:42 +0800 |
commit | 86ee2412abacff33340559f2f4626ea44564a038 (patch) | |
tree | 627cc4fb988130e91473414cacd9270b2de6d99f /haddock-library/src/Documentation/Haddock/Parser.hs | |
parent | 0891c568f645edcac35442576757ab6fcaa7b6ec (diff) |
Minor code simplification
Diffstat (limited to 'haddock-library/src/Documentation/Haddock/Parser.hs')
-rw-r--r-- | haddock-library/src/Documentation/Haddock/Parser.hs | 7 |
1 files 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. |