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

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

    import GHC
    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 = \case
      HsAnnotation NoExtField _ annProv :: AnnProvenance (IdP GhcPs)
    annProv expr :: Located (HsExpr GhcPs)
    expr -> Text -> R () -> R ()
    pragma "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 (IdP GhcPs) -> R ()
    p_annProv AnnProvenance (IdP GhcPs)
    annProv
        R ()
    breakpoint
        Located (HsExpr GhcPs) -> (HsExpr GhcPs -> R ()) -> R ()
    forall a. Located a -> (a -> R ()) -> R ()
    located Located (HsExpr GhcPs)
    expr HsExpr GhcPs -> R ()
    p_hsExpr
      XAnnDecl x :: XXAnnDecl GhcPs
    x -> NoExtCon -> R ()
    forall a. NoExtCon -> a
    noExtCon NoExtCon
    XXAnnDecl GhcPs
    x

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