{-# LANGUAGE ViewPatterns #-} module RnHsDoc ( rnHsDoc, rnLHsDoc, rnMbLHsDoc ) where import GhcPrelude import TcRnTypes import HsSyn import SrcLoc rnMbLHsDoc :: Maybe LHsDocString -> RnM (Maybe LHsDocString) rnMbLHsDoc :: Maybe LHsDocString -> RnM (Maybe LHsDocString) rnMbLHsDoc mb_doc :: Maybe LHsDocString mb_doc = case Maybe LHsDocString mb_doc of Just doc :: LHsDocString doc -> do LHsDocString doc' <- LHsDocString -> RnM LHsDocString rnLHsDoc LHsDocString doc Maybe LHsDocString -> RnM (Maybe LHsDocString) forall (m :: * -> *) a. Monad m => a -> m a return (LHsDocString -> Maybe LHsDocString forall a. a -> Maybe a Just LHsDocString doc') Nothing -> Maybe LHsDocString -> RnM (Maybe LHsDocString) forall (m :: * -> *) a. Monad m => a -> m a return Maybe LHsDocString forall a. Maybe a Nothing rnLHsDoc :: LHsDocString -> RnM LHsDocString rnLHsDoc :: LHsDocString -> RnM LHsDocString rnLHsDoc (LHsDocString -> Located (SrcSpanLess LHsDocString) forall a. HasSrcSpan a => a -> Located (SrcSpanLess a) dL->L pos :: SrcSpan pos doc :: SrcSpanLess LHsDocString doc) = do HsDocString doc' <- HsDocString -> RnM HsDocString rnHsDoc SrcSpanLess LHsDocString HsDocString doc LHsDocString -> RnM LHsDocString forall (m :: * -> *) a. Monad m => a -> m a return (SrcSpan -> SrcSpanLess LHsDocString -> LHsDocString forall a. HasSrcSpan a => SrcSpan -> SrcSpanLess a -> a cL SrcSpan pos SrcSpanLess LHsDocString HsDocString doc') rnHsDoc :: HsDocString -> RnM HsDocString rnHsDoc :: HsDocString -> RnM HsDocString rnHsDoc = HsDocString -> RnM HsDocString forall (f :: * -> *) a. Applicative f => a -> f a pure