module Language.Ltml.Parser.SimpleParagraph
    ( simpleParagraphP
    )
where

import Language.Lsd.AST.Type.SimpleParagraph
    ( SimpleParagraphType (SimpleParagraphType)
    )
import Language.Ltml.AST.SimpleParagraph (SimpleParagraph (SimpleParagraph))
import Language.Ltml.Parser (Parser)
import Language.Ltml.Parser.Text (textForestP)

simpleParagraphP :: SimpleParagraphType -> Parser SimpleParagraph
simpleParagraphP :: SimpleParagraphType -> Parser SimpleParagraph
simpleParagraphP (SimpleParagraphType SimpleParagraphFormat
fmt TextType EnumType
tt) =
    SimpleParagraphFormat -> [RichTextTree] -> SimpleParagraph
SimpleParagraph SimpleParagraphFormat
fmt ([RichTextTree] -> SimpleParagraph)
-> ParsecT Void Text Identity [RichTextTree]
-> Parser SimpleParagraph
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> TextType EnumType -> ParsecT Void Text Identity [RichTextTree]
forall (m :: * -> *) lbrk fnref style enumType enum special.
(ParserWrapper m, LineBreakP lbrk, FootnoteRefP fnref,
 StyleP style, EnumP enumType enum, SpecialP m special) =>
TextType enumType -> m [TextTree lbrk fnref style enum special]
textForestP TextType EnumType
tt