Muse reader: rewrite museOrderedListMarker without "do"

This commit is contained in:
Alexander Krotov 2018-04-03 16:09:12 +03:00
parent 51e8a79023
commit d6b8d7feb8

View file

@ -563,16 +563,15 @@ anyMuseOrderedListMarker = do
museOrderedListMarker :: PandocMonad m
=> ListNumberStyle
-> MuseParser m Int
museOrderedListMarker style = do
(_, start) <- case style of
Decimal -> decimal
UpperRoman -> upperRoman
LowerRoman -> lowerRoman
UpperAlpha -> upperAlpha
LowerAlpha -> lowerAlpha
_ -> fail "Unhandled case"
char '.'
return start
museOrderedListMarker style =
snd <$> p <* char '.'
where p = case style of
Decimal -> decimal
UpperRoman -> upperRoman
LowerRoman -> lowerRoman
UpperAlpha -> upperAlpha
LowerAlpha -> lowerAlpha
_ -> fail "Unhandled case"
orderedListItemsUntil :: PandocMonad m
=> Int