                         , docConfig = defaultConfig
                         }

type Encoder a = State EncoderState a

type BlockEncoder = Block -> (Encoder Doc)
type EncoderForDoc a = a -> (Encoder Doc)

blockEncoder :: BlockEncoder
blockEncoder =
  selectEncoder genericBlockEncoder
    [ context === constS "section" --> sectionEncoder
    , emptyContentS --> macroEncoder