    {-# LANGUAGE LambdaCase #-}
    {-# LANGUAGE OverloadedStrings #-}

    module Ormolu.Printer.Meat.Declaration.Annotation
      ( p_annDecl,
      )
    where

    import GHC.Hs
    import Ormolu.Printer.Combinators
    import Ormolu.Printer.Meat.Common
    import Ormolu.Printer.Meat.Declaration.Value

    p_annDecl :: AnnDecl GhcPs -> R ()
    p_annDecl :: AnnDecl GhcPs -> R ()
    p_annDecl (HsAnnotation XHsAnnotation GhcPs
    _ SourceText
    _ AnnProvenance GhcPs
    annProv XRec GhcPs (HsExpr GhcPs)
    expr) =
      Text -> R () -> R ()
    pragma Text
    "ANN" (R () -> R ()) -> (R () -> R ()) -> R () -> R ()
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . R () -> R ()
    inci (R () -> R ()) -> R () -> R ()
    forall a b. (a -> b) -> a -> b
    $ do
        AnnProvenance GhcPs -> R ()
    p_annProv AnnProvenance GhcPs
    annProv
        R ()
    breakpoint
        GenLocated SrcSpanAnnA (HsExpr GhcPs)
    -> (HsExpr GhcPs -> R ()) -> R ()
    forall l a. HasSrcSpan l => GenLocated l a -> (a -> R ()) -> R ()
    located GenLocated SrcSpanAnnA (HsExpr GhcPs)
    XRec GhcPs (HsExpr GhcPs)
    expr HsExpr GhcPs -> R ()
    p_hsExpr

    p_annProv :: AnnProvenance GhcPs -> R ()
    p_annProv :: AnnProvenance GhcPs -> R ()
    p_annProv = \case
      ValueAnnProvenance LIdP GhcPs
    name -> LocatedN RdrName -> R ()
    p_rdrName LocatedN RdrName
    LIdP GhcPs
    name
      TypeAnnProvenance LIdP GhcPs
    name -> Text -> R ()
    txt Text
    "type" R () -> R () -> R ()
    forall a b. R a -> R b -> R b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> R ()
    space R () -> R () -> R ()
    forall a b. R a -> R b -> R b
    forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
    >> LocatedN RdrName -> R ()
    p_rdrName LocatedN RdrName
    LIdP GhcPs
    name
      AnnProvenance GhcPs
    ModuleAnnProvenance -> Text -> R ()
    txt Text
    "module"