{-# LANGUAGE DataKinds #-}

module Language.Haskell.Brittany.Internal.Layouters.Type
  ( layoutType
  , layoutTyVarBndrs
  , processTyVarBndrsSingleline
  )
where



#include "prelude.inc"

import           Language.Haskell.Brittany.Internal.Config.Types
import           Language.Haskell.Brittany.Internal.Types
import           Language.Haskell.Brittany.Internal.LayouterBasics
import           Language.Haskell.Brittany.Internal.Utils
                                                ( splitFirstLast
                                                , FirstLastView(..)
                                                )

import           GHC ( runGhc
                     , GenLocated(L)
                     , moduleNameString
                     , AnnKeywordId (..)
                     )
import           Language.Haskell.GHC.ExactPrint.Types ( mkAnnKey )
#if MIN_VERSION_ghc(8,10,1)   /* ghc-8.10.1 */
import           GHC.Hs
#else
import           HsSyn
#endif
import           Name
import           Outputable ( ftext, showSDocUnsafe )
import           BasicTypes
import qualified SrcLoc

import           DataTreePrint



layoutType :: ToBriDoc HsType
layoutType :: ToBriDoc HsType
layoutType ltype :: Located (HsType GhcPs)
ltype@(L SrcSpan
_ HsType GhcPs
typ) = Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNode Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ case HsType GhcPs
typ of
  -- _ | traceShow (ExactPrint.Types.mkAnnKey ltype) False -> error "impossible"
  HsTyVar XTyVar GhcPs
_ PromotionFlag
promoted Located (IdP GhcPs)
name -> do
    Text
t <- Located RdrName
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     Text
forall (m :: * -> *).
(MonadMultiReader Config m, MonadMultiReader Anns m) =>
Located RdrName -> m Text
lrdrNameToTextAnnTypeEqualityIsSpecial Located (IdP GhcPs)
Located RdrName
name
    case PromotionFlag
promoted of
#if MIN_VERSION_ghc(8,8,0)
      PromotionFlag
IsPromoted -> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
#else /* ghc-8.6 */
      Promoted -> docSeq
#endif
        [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docTick
        , Located RdrName
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNode Located (IdP GhcPs)
Located RdrName
name (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
t
        ]
      PromotionFlag
NotPromoted -> Located RdrName
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNode Located (IdP GhcPs)
Located RdrName
name (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
t
#if MIN_VERSION_ghc(8,10,1)
  HsForAllTy XForAllTy GhcPs
_ ForallVisFlag
_ [LHsTyVarBndr GhcPs]
bndrs (L SrcSpan
_ (HsQualTy XQualTy GhcPs
_ (L SrcSpan
_ HsContext GhcPs
cntxts) Located (HsType GhcPs)
typ2)) -> do
#else
  HsForAllTy _ bndrs (L _ (HsQualTy _ (L _ cntxts) typ2)) -> do
#endif
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ2
    [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
tyVarDocs <- [LHsTyVarBndr GhcPs]
-> ToBriDocM
     [(Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))]
layoutTyVarBndrs [LHsTyVarBndr GhcPs]
bndrs
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs <- HsContext GhcPs
cntxts HsContext GhcPs
-> (Located (HsType GhcPs)
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     [MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
t a -> (a -> m b) -> m (t b)
`forM` ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType
    let maybeForceML :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML = case Located (HsType GhcPs)
typ2 of
          (L SrcSpan
_ HsFunTy{}) -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceMultiline
          Located (HsType GhcPs)
_               -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. a -> a
id
    let
      tyVarDocLineList :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
tyVarDocLineList = [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
processTyVarBndrsSingleline [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
tyVarDocs
      forallDoc :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
forallDoc = [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
        [ let
            open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"forall"
            in [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open][MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
tyVarDocLineList)
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
            (Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (String -> Text
Text.pack String
"forall"))
            ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
            ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
tyVarDocs [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
-> ((Text,
     Maybe
       (MultiRWST
          '[Config, Anns]
          '[[BrittanyError], Seq String]
          '[NodeAllocIndex]
          Identity
          BriDocNumbered))
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \case
                (Text
tname, Maybe
  (MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered)
Nothing) -> BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docEnsureIndent BrIndent
BrIndentRegular (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
tname
                (Text
tname, Just MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
doc) -> BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docEnsureIndent BrIndent
BrIndentRegular
                  (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
                    [ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                      [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep
                      , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
tname
                      ]
                    , ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                      [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
":: "
                      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
doc
                      ]
                    , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
                    ])
        ]
      contextDoc :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
contextDoc = case [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs of
        [] -> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"()"
        [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
x] -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
x
        [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
_ -> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
          [ let
              open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open  = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"("
              close :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
              list :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list  = MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
List.intersperse MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep
                    ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> [MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered])
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs
              in [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open][MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close])
          , let
              open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open = ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                      [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep
                      , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. [a] -> a
head [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs
                      ]
              close :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
              list :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list = [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a]
List.tail [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
cntxtDoc ->
                     ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                      [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep
                      , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
cntxtDoc
                      ]
            in MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close]
          ]
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      -- :: forall a b c . (Foo a b c) => a b -> c
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ if [LHsTyVarBndr GhcPs] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [LHsTyVarBndr GhcPs]
bndrs
            then MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docEmpty
            else let
              open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"forall"
              close :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" . "
              in [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open, MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator][MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
tyVarDocLineList[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close])
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
contextDoc
        , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" => "
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc
        ]
      -- :: forall a b c
      --  . (Foo a b c)
      -- => a b
      -- -> c
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
forallDoc
          ( [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
            [ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
              [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" . "
              , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3)
              (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
contextDoc
              ]
            , ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
              [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"=> "
              , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc
              ]
            ]
          )
      ]
#if MIN_VERSION_ghc(8,10,1)
  HsForAllTy XForAllTy GhcPs
_ ForallVisFlag
_ [LHsTyVarBndr GhcPs]
bndrs Located (HsType GhcPs)
typ2 -> do
#else
  HsForAllTy _ bndrs typ2 -> do
#endif
    BriDocNumbered
typeDoc <- ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ2
    [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
tyVarDocs <- [LHsTyVarBndr GhcPs]
-> ToBriDocM
     [(Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))]
layoutTyVarBndrs [LHsTyVarBndr GhcPs]
bndrs
    let maybeForceML :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML = case Located (HsType GhcPs)
typ2 of
          (L SrcSpan
_ HsFunTy{}) -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceMultiline
          Located (HsType GhcPs)
_               -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. a -> a
id
    let tyVarDocLineList :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
tyVarDocLineList = [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
processTyVarBndrsSingleline [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
tyVarDocs
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      -- forall x . x
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ if [LHsTyVarBndr GhcPs] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [LHsTyVarBndr GhcPs]
bndrs
            then MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docEmpty
            else let
              open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"forall"
              close :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" . "
              in [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open][MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
tyVarDocLineList[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close])
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall (m :: * -> *) a. Monad m => a -> m a
return (BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ BriDocNumbered
typeDoc
        ]
      -- :: forall x
      --  . x
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (String -> Text
Text.pack String
"forall") MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
tyVarDocLineList)
          ( ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" . "
            , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall (m :: * -> *) a. Monad m => a -> m a
return BriDocNumbered
typeDoc
            ]
          )
      -- :: forall
      --      (x :: *)
      --  . x
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          (Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (String -> Text
Text.pack String
"forall"))
          ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
          ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ ([(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
tyVarDocs [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
-> ((Text,
     Maybe
       (MultiRWST
          '[Config, Anns]
          '[[BrittanyError], Seq String]
          '[NodeAllocIndex]
          Identity
          BriDocNumbered))
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \case
              (Text
tname, Maybe
  (MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered)
Nothing) -> BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docEnsureIndent BrIndent
BrIndentRegular (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
tname
              (Text
tname, Just MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
doc) -> BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docEnsureIndent BrIndent
BrIndentRegular
                (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
                  [ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                    [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep
                    , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
tname
                    ]
                  , ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                    [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
":: "
                    , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
doc
                    ]
                  , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
                  ]
            )
          [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
              [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" . "
              , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall (m :: * -> *) a. Monad m => a -> m a
return BriDocNumbered
typeDoc
              ]
            ]
          )
      ]
  HsQualTy XQualTy GhcPs
_ lcntxts :: GenLocated SrcSpan (HsContext GhcPs)
lcntxts@(L SrcSpan
_ HsContext GhcPs
cntxts) Located (HsType GhcPs)
typ1 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs <- HsContext GhcPs
cntxts HsContext GhcPs
-> (Located (HsType GhcPs)
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     [MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
t a -> (a -> m b) -> m (t b)
`forM` ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType
    let
      contextDoc :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
contextDoc = GenLocated SrcSpan (HsContext GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNode GenLocated SrcSpan (HsContext GhcPs)
lcntxts (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ case [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs of
        [] -> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"()"
        [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
x] -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
x
        [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
_ -> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
          [ let
              open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open  = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"("
              close :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
              list :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list  = MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
List.intersperse MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep
                    ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> [MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered])
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs
              in [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open][MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++[MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close])
          , let
              open :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open = ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                      [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep
                      , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2)
                      (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. [a] -> a
head [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs
                      ]
              close :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
              list :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list = [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a]
List.tail [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
cntxtDocs [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
cntxtDoc ->
                     ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
                      [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep
                      , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2)
                      (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
cntxtDoc
                      ]
            in MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
open (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
list [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
close]
          ]
    let maybeForceML :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML = case Located (HsType GhcPs)
typ1 of
          (L SrcSpan
_ HsFunTy{}) -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceMultiline
          Located (HsType GhcPs)
_               -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. a -> a
id
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      -- (Foo a b c) => a b -> c
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
contextDoc
        , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" => "
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc
        ]
      --    (Foo a b c)
      -- => a b
      -- -> c
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          (MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
contextDoc)
          ( ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
            [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"=> "
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc
            ]
          )
      ]
  HsFunTy XFunTy GhcPs
_ Located (HsType GhcPs)
typ1 Located (HsType GhcPs)
typ2 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc2 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ2
    let maybeForceML :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML = case Located (HsType GhcPs)
typ2 of
          (L SrcSpan
_ HsFunTy{}) -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceMultiline
          Located (HsType GhcPs)
_               -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. a -> a
id
    Bool
hasComments <- Located (HsType GhcPs) -> ToBriDocM Bool
forall ast. Data ast => Located ast -> ToBriDocM Bool
hasAnyCommentsBelow Located (HsType GhcPs)
ltype
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
appSep (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
appSep (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"->"
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc2
        ]
      | Bool -> Bool
not Bool
hasComments
      ] [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++
      [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
        (Located (HsType GhcPs)
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall ast.
Data ast =>
Located ast
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docNodeAnnKW Located (HsType GhcPs)
ltype Maybe AnnKeywordId
forall a. Maybe a
Nothing MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1)
        ( ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
          [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
appSep (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"->"
          , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3)
          (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
maybeForceML MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc2
          ]
        )
      ]
  HsParTy XParTy GhcPs
_ Located (HsType GhcPs)
typ1 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"("
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
        , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
        ]
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          ( ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
            ])
          (Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")")
      ]
  HsAppTy XAppTy GhcPs
_ typ1 :: Located (HsType GhcPs)
typ1@(L SrcSpan
_ HsAppTy{}) Located (HsType GhcPs)
typ2 -> do
    let gather :: [LHsType GhcPs] -> LHsType GhcPs -> (LHsType GhcPs, [LHsType GhcPs])
        gather :: HsContext GhcPs
-> Located (HsType GhcPs)
-> (Located (HsType GhcPs), HsContext GhcPs)
gather HsContext GhcPs
list = \case
          L SrcSpan
_ (HsAppTy XAppTy GhcPs
_ Located (HsType GhcPs)
ty1 Located (HsType GhcPs)
ty2) -> HsContext GhcPs
-> Located (HsType GhcPs)
-> (Located (HsType GhcPs), HsContext GhcPs)
gather (Located (HsType GhcPs)
ty2Located (HsType GhcPs) -> HsContext GhcPs -> HsContext GhcPs
forall a. a -> [a] -> [a]
:HsContext GhcPs
list) Located (HsType GhcPs)
ty1
          Located (HsType GhcPs)
final -> (Located (HsType GhcPs)
final, HsContext GhcPs
list)
    let (Located (HsType GhcPs)
typHead, HsContext GhcPs
typRest) = HsContext GhcPs
-> Located (HsType GhcPs)
-> (Located (HsType GhcPs), HsContext GhcPs)
gather [Located (HsType GhcPs)
typ2] Located (HsType GhcPs)
typ1
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docHead <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typHead
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docRest <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType (Located (HsType GhcPs)
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> HsContext GhcPs
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     [MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
`mapM` HsContext GhcPs
typRest
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
      ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docHead MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
: ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docRest [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered
    -> [MultiRWST
          '[Config, Anns]
          '[[BrittanyError], Seq String]
          '[NodeAllocIndex]
          Identity
          BriDocNumbered])
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d ->
        [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator, MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d ])
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docHead ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docEnsureIndent BrIndent
BrIndentRegular (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docRest)
      ]
  HsAppTy XAppTy GhcPs
_ Located (HsType GhcPs)
typ1 Located (HsType GhcPs)
typ2 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc2 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ2
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc2
        ]
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
          (BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docEnsureIndent BrIndent
BrIndentRegular MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc2)
      ]
  HsListTy XListTy GhcPs
_ Located (HsType GhcPs)
typ1 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"["
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
        , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"]"
        ]
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          ( ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"[ "
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
            ])
          (Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"]")
      ]
  HsTupleTy XTupleTy GhcPs
_ HsTupleSort
tupleSort HsContext GhcPs
typs -> case HsTupleSort
tupleSort of
    HsTupleSort
HsUnboxedTuple           -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
unboxed
    HsTupleSort
HsBoxedTuple             -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
simple
    HsTupleSort
HsConstraintTuple        -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
simple
    HsTupleSort
HsBoxedOrConstraintTuple -> MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
simple
   where
    unboxed :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
unboxed = if HsContext GhcPs -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null HsContext GhcPs
typs then String
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. HasCallStack => String -> a
error String
"brittany internal error: unboxed unit"
                           else MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
unboxedL
    simple :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
simple = if HsContext GhcPs -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null HsContext GhcPs
typs then MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
unitL else MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
simpleL
    unitL :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
unitL = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"()"
    simpleL :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
simpleL = do
      [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType (Located (HsType GhcPs)
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> HsContext GhcPs
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     [MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
`mapM` HsContext GhcPs
typs
      let end :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
          lines :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
lines = [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a]
List.tail [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d ->
            BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2)
              (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep, MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d]
          commaDocs :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
commaDocs = MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
List.intersperse MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep (MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs)
      [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
        [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"("]
               [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ Located (HsType GhcPs)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
commaDocs
               [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end]
        , let line1 :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
line1 = ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep, [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. [a] -> a
head [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs]
          in MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
            (BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
line1)
            ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Located (HsType GhcPs)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
lines [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end])
        ]
    unboxedL :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
unboxedL = do
      [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType (Located (HsType GhcPs)
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> HsContext GhcPs
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     [MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
`mapM` HsContext GhcPs
typs
      let start :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
start = MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenHashLSep
          end :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end   = MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenHashRSep
      [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
        [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
start]
                [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ Located (HsType GhcPs)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
List.intersperse MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs)
                [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end]
        , let
            line1 :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
line1 = ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
start, [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. [a] -> a
head [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs]
            lines :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
lines  = [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a]
List.tail [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
docs [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d ->
              BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2)
                (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docCommaSep, MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d]
          in MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
            (BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
line1)
            ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
lines [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end])
        ]
  HsOpTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsOpTy{}" Located (HsType GhcPs)
ltype
  -- HsOpTy typ1 opName typ2 -> do
  --   -- TODO: these need some proper fixing. precedences don't add up.
  --   --       maybe the parser just returns some trivial right recursion
  --   --       parse result for any type level operators.
  --   --       need to check how things are handled on the expression level.
  --   let opStr = lrdrNameToText opName
  --   let opLen = Text.length opStr
  --   layouter1@(Layouter desc1 _ _) <- layoutType typ1
  --   layouter2@(Layouter desc2 _ _) <- layoutType typ2
  --   let line = do -- Maybe
  --         l1 <- _ldesc_line desc1
  --         l2 <- _ldesc_line desc2
  --         let len1 = _lColumns_min l1
  --         let len2 = _lColumns_min l2
  --         let len = 2 + opLen + len1 + len2
  --         return $ LayoutColumns
  --           { _lColumns_key = ColumnKeyUnique
  --           , _lColumns_lengths = [len]
  --           , _lColumns_min = len
  --           }
  --   let block = do -- Maybe
  --         rol1 <- descToBlockStart desc1
  --         (min2, max2) <- descToMinMax (1+opLen) desc2
  --         let (minR, maxR) = case descToBlockMinMax desc1 of
  --               Nothing -> (min2, max2)
  --               Just (min1, max1) -> (max min1 min2, max max1 max2)
  --         return $ BlockDesc
  --           { _bdesc_blockStart = rol1
  --           , _bdesc_min = minR
  --           , _bdesc_max = maxR
  --           , _bdesc_opIndentFloatUp = Just (1+opLen)
  --           }
  --   return $ Layouter
  --     { _layouter_desc = LayoutDesc
  --       { _ldesc_line = line
  --       , _ldesc_block = block
  --       }
  --     , _layouter_func = \params -> do
  --         remaining <- getCurRemaining
  --         let allowSameLine = _params_sepLines params /= SepLineTypeOp
  --         case line of
  --           Just (LayoutColumns _ _ m) | m <= remaining && allowSameLine -> do
  --             applyLayouterRestore layouter1 defaultParams
  --             layoutWriteAppend $ Text.pack " " <> opStr <> Text.pack " "
  --             applyLayouterRestore layouter2 defaultParams
  --           _ -> do
  --             let upIndent   = maybe (1+opLen) (max (1+opLen)) $ _params_opIndent params
  --             let downIndent = maybe upIndent (max upIndent) $ _bdesc_opIndentFloatUp =<< _ldesc_block desc2
  --             layoutWithAddIndentN downIndent $ applyLayouterRestore layouter1 defaultParams
  --             layoutWriteNewline
  --             layoutWriteAppend $ opStr <> Text.pack " "
  --             layoutWriteEnsureBlockPlusN downIndent
  --             applyLayouterRestore layouter2 defaultParams
  --               { _params_sepLines = SepLineTypeOp
  --               , _params_opIndent = Just downIndent
  --               }
  --     , _layouter_ast = ltype
  --     }
  HsIParamTy XIParamTy GhcPs
_ (L SrcSpan
_ (HsIPName FastString
ipName)) Located (HsType GhcPs)
typ1 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
        [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype
        (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit
        (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack (String
"?" String -> String -> String
forall a. [a] -> [a] -> [a]
++ SDoc -> String
showSDocUnsafe (FastString -> SDoc
ftext FastString
ipName) String -> String -> String
forall a. [a] -> [a] -> [a]
++ String
"::")
        , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
        ]
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          ( Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit
          (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack (String
"?" String -> String -> String
forall a. [a] -> [a] -> [a]
++ SDoc -> String
showSDocUnsafe (FastString -> SDoc
ftext FastString
ipName))
          )
          (ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype
            (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
":: "
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
2) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
            ])
      ]
  -- TODO: test KindSig
  HsKindSig XKindSig GhcPs
_ Located (HsType GhcPs)
typ1 Located (HsType GhcPs)
kind1 -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
typ1
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
kindDoc1 <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
kind1
    Bool
hasParens <- Located (HsType GhcPs) -> AnnKeywordId -> ToBriDocM Bool
forall a (m :: * -> *).
(Data a, MonadMultiReader Anns m) =>
Located a -> AnnKeywordId -> m Bool
hasAnnKeyword Located (HsType GhcPs)
ltype AnnKeywordId
AnnOpenP
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ if Bool
hasParens
        then [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
          [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"("
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
          , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"::"
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
kindDoc1
          , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
          ]
        else [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
          [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
          , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"::"
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
kindDoc1
          ]
      , if Bool
hasParens
        then [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
          [ ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols
            ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docParenLSep
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
            ]
          , ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols
            ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
":: "
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
kindDoc1
            ]
          , (Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")")
          ]
        else MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
typeDoc1
          ( ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols
            ColSig
ColTyOpPrefix
            [ Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a ast. (DocWrapable a, Data ast) => Located ast -> a -> a
docWrapNodeRest Located (HsType GhcPs)
ltype (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
":: "
            , BrIndent
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAddBaseY (Int -> BrIndent
BrIndentSpecial Int
3) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
kindDoc1
            ]
          )
      ]
  HsBangTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsBangTy{}" Located (HsType GhcPs)
ltype
  -- HsBangTy bang typ1 -> do
  --   let bangStr = case bang of
  --         HsSrcBang _ unpackness strictness ->
  --           (++)
  --             (case unpackness of
  --               SrcUnpack   -> "{-# UNPACK -#} "
  --               SrcNoUnpack -> "{-# NOUNPACK -#} "
  --               NoSrcUnpack -> ""
  --             )
  --             (case strictness of
  --               SrcLazy     -> "~"
  --               SrcStrict   -> "!"
  --               NoSrcStrict -> ""
  --             )
  --   let bangLen = length bangStr
  --   layouter@(Layouter desc _ _) <- layoutType typ1
  --   let line = do -- Maybe
  --         l <- _ldesc_line desc
  --         let len = bangLen + _lColumns_min l
  --         return $ LayoutColumns
  --           { _lColumns_key = ColumnKeyUnique
  --           , _lColumns_lengths = [len]
  --           , _lColumns_min = len
  --           }
  --   let block = do -- Maybe
  --         rol <- descToBlockStart desc
  --         (minR,maxR) <- descToBlockMinMax desc
  --         return $ BlockDesc
  --           { _bdesc_blockStart = rol
  --           , _bdesc_min = minR
  --           , _bdesc_max = maxR
  --           , _bdesc_opIndentFloatUp = Nothing
  --           }
  --   return $ Layouter
  --     { _layouter_desc = LayoutDesc
  --       { _ldesc_line = line
  --       , _ldesc_block = block
  --       }
  --     , _layouter_func = \_params -> do
  --         remaining <- getCurRemaining
  --         case line of
  --           Just (LayoutColumns _ _ m) | m <= remaining -> do
  --             layoutWriteAppend $ Text.pack $ bangStr
  --             applyLayouterRestore layouter defaultParams
  --           _ -> do
  --             layoutWriteAppend $ Text.pack $ bangStr
  --             layoutWritePostCommentsRestore ltype
  --             applyLayouterRestore layouter defaultParams
  --     , _layouter_ast = ltype
  --     }
  HsSpliceTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsSpliceTy{}" Located (HsType GhcPs)
ltype
  HsDocTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsDocTy{}" Located (HsType GhcPs)
ltype
  HsRecTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsRecTy{}" Located (HsType GhcPs)
ltype
  HsExplicitListTy XExplicitListTy GhcPs
_ PromotionFlag
_ HsContext GhcPs
typs -> do
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
typDocs <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType (Located (HsType GhcPs)
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> HsContext GhcPs
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     [MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
`mapM` HsContext GhcPs
typs
    Bool
hasComments <- Located (HsType GhcPs) -> ToBriDocM Bool
forall ast. Data ast => Located ast -> ToBriDocM Bool
hasAnyCommentsBelow Located (HsType GhcPs)
ltype
    let specialCommaSep :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
specialCommaSep = MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
appSep (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" ,"
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
      ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$  [Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"'["]
      [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
List.intersperse MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
specialCommaSep (MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
typDocs)
      [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"]"]
      , case [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> FirstLastView
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall a. [a] -> FirstLastView a
splitFirstLast [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
typDocs of
        FirstLastView
  (MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered)
FirstLastEmpty -> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
          [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"'["
          , Located (HsType GhcPs)
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall ast.
Data ast =>
Located ast
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docNodeAnnKW Located (HsType GhcPs)
ltype (AnnKeywordId -> Maybe AnnKeywordId
forall a. a -> Maybe a
Just AnnKeywordId
AnnOpenS) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"]"
          ]
        FirstLastSingleton MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
e -> [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
          [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
            [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"'["
            , Located (HsType GhcPs)
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall ast.
Data ast =>
Located ast
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docNodeAnnKW Located (HsType GhcPs)
ltype (AnnKeywordId -> Maybe AnnKeywordId
forall a. a -> Maybe a
Just AnnKeywordId
AnnOpenS) (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
e
            , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"]"
            ]
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSetBaseY (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines
            [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
              [ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"'["
              , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
              , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSetBaseY (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Located (HsType GhcPs)
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall ast.
Data ast =>
Located ast
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docNodeAnnKW Located (HsType GhcPs)
ltype (AnnKeywordId -> Maybe AnnKeywordId
forall a. a -> Maybe a
Just AnnKeywordId
AnnOpenS) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
e
              ]
            , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" ]"
            ]
          ]
        FirstLast MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
e1 [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
ems MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
eN -> CollectAltM ()
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
runFilteredAlternative (CollectAltM ()
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> CollectAltM ()
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ do
          Bool
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> CollectAltM ()
addAlternativeCond (Bool -> Bool
not Bool
hasComments)
            (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> CollectAltM ())
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> CollectAltM ()
forall a b. (a -> b) -> a -> b
$  [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
            ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$  [Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"'["]
            [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
List.intersperse MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
specialCommaSep (MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
e1MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. a -> [a] -> [a]
:[MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
ems [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [Located (HsType GhcPs)
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall ast.
Data ast =>
Located ast
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docNodeAnnKW Located (HsType GhcPs)
ltype (AnnKeywordId -> Maybe AnnKeywordId
forall a. a -> Maybe a
Just AnnKeywordId
AnnOpenS) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
eN]))
            [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" ]"]
          MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> CollectAltM ()
addAlternative (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> CollectAltM ())
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> CollectAltM ()
forall a b. (a -> b) -> a -> b
$
            let
              start :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
start = ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColList
                        [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
appSep (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"'[", MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
e1]
              linesM :: [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
linesM = [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
ems [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (f :: * -> *) a b. Functor f => f a -> (a -> b) -> f b
<&> \MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d ->
                      ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColList [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
specialCommaSep, MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d]
              lineN :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
lineN = ColSig
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docCols ColSig
ColList [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
specialCommaSep, Located (HsType GhcPs)
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall ast.
Data ast =>
Located ast
-> Maybe AnnKeywordId
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docNodeAnnKW Located (HsType GhcPs)
ltype (AnnKeywordId -> Maybe AnnKeywordId
forall a. a -> Maybe a
Just AnnKeywordId
AnnOpenS) MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
eN]
              end :: MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end   = Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
" ]"
            in MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSetBaseY (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLines ([MultiRWST
    '[Config, Anns]
    '[[BrittanyError], Seq String]
    '[NodeAllocIndex]
    Identity
    BriDocNumbered]
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
start] [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
linesM [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
lineN] [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall a. [a] -> [a] -> [a]
++ [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
end]
      ]
  HsExplicitTupleTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsExplicitTupleTy{}" Located (HsType GhcPs)
ltype
  HsTyLit XTyLit GhcPs
_ HsTyLit
lit -> case HsTyLit
lit of
    HsNumTy (SourceText String
srctext) Integer
_ -> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
srctext
    HsNumTy SourceText
NoSourceText Integer
_ ->
      String
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. HasCallStack => String -> a
error String
"overLitValBriDoc: literal with no SourceText"
    HsStrTy (SourceText String
srctext) FastString
_ -> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
srctext
    HsStrTy SourceText
NoSourceText FastString
_ ->
      String
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. HasCallStack => String -> a
error String
"overLitValBriDoc: literal with no SourceText"
  HsWildCardTy XWildCardTy GhcPs
_ ->
    Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"_"
  HsSumTy{} -> -- TODO
    String -> ToBriDoc HsType
forall ast.
(Annotate ast, Data ast) =>
String
-> Located ast
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
briDocByExactInlineOnly String
"HsSumTy{}" Located (HsType GhcPs)
ltype
  HsStarTy XStarTy GhcPs
_ Bool
isUnicode -> do
    if Bool
isUnicode
      then Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"\x2605" -- Unicode star
      else Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"*"
  XHsType{} -> String
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a. HasCallStack => String -> a
error String
"brittany internal error: XHsType"
#if MIN_VERSION_ghc(8,8,0)
  HsAppKindTy XAppKindTy GhcPs
_ Located (HsType GhcPs)
ty Located (HsType GhcPs)
kind -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
t <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
ty
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
k <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
kind
    [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docAlt
      [ [MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq
          [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
t
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
          , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"@"
          , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
k
          ]
      , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docPar
          MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
t
          ([MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered]
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docSeq [Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"@", MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
k ])
      ]
#endif

layoutTyVarBndrs
  :: [LHsTyVarBndr GhcPs]
  -> ToBriDocM [(Text, Maybe (ToBriDocM BriDocNumbered))]
layoutTyVarBndrs :: [LHsTyVarBndr GhcPs]
-> ToBriDocM
     [(Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))]
layoutTyVarBndrs = (LHsTyVarBndr GhcPs
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered)))
-> [LHsTyVarBndr GhcPs]
-> ToBriDocM
     [(Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((LHsTyVarBndr GhcPs
  -> MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       (Text,
        Maybe
          (MultiRWST
             '[Config, Anns]
             '[[BrittanyError], Seq String]
             '[NodeAllocIndex]
             Identity
             BriDocNumbered)))
 -> [LHsTyVarBndr GhcPs]
 -> ToBriDocM
      [(Text,
        Maybe
          (MultiRWST
             '[Config, Anns]
             '[[BrittanyError], Seq String]
             '[NodeAllocIndex]
             Identity
             BriDocNumbered))])
-> (LHsTyVarBndr GhcPs
    -> MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         (Text,
          Maybe
            (MultiRWST
               '[Config, Anns]
               '[[BrittanyError], Seq String]
               '[NodeAllocIndex]
               Identity
               BriDocNumbered)))
-> [LHsTyVarBndr GhcPs]
-> ToBriDocM
     [(Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered))]
forall a b. (a -> b) -> a -> b
$ \case
  (L SrcSpan
_ (UserTyVar XUserTyVar GhcPs
_ Located (IdP GhcPs)
name)) -> (Text,
 Maybe
   (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (Text,
      Maybe
        (MultiRWST
           '[Config, Anns]
           '[[BrittanyError], Seq String]
           '[NodeAllocIndex]
           Identity
           BriDocNumbered))
forall (m :: * -> *) a. Monad m => a -> m a
return ((Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered)))
-> (Text,
    Maybe
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (Text,
      Maybe
        (MultiRWST
           '[Config, Anns]
           '[[BrittanyError], Seq String]
           '[NodeAllocIndex]
           Identity
           BriDocNumbered))
forall a b. (a -> b) -> a -> b
$ (Located RdrName -> Text
forall l. GenLocated l RdrName -> Text
lrdrNameToText Located (IdP GhcPs)
Located RdrName
name, Maybe
  (MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered)
forall a. Maybe a
Nothing)
  (L SrcSpan
_ (KindedTyVar XKindedTyVar GhcPs
_ Located (IdP GhcPs)
lrdrName Located (HsType GhcPs)
kind)) -> do
    MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d <- ToBriDoc HsType
-> Located (HsType GhcPs)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall (m :: * -> *) x y. Monad m => (x -> m y) -> x -> m (m y)
docSharedWrapper ToBriDoc HsType
layoutType Located (HsType GhcPs)
kind
    (Text,
 Maybe
   (MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (Text,
      Maybe
        (MultiRWST
           '[Config, Anns]
           '[[BrittanyError], Seq String]
           '[NodeAllocIndex]
           Identity
           BriDocNumbered))
forall (m :: * -> *) a. Monad m => a -> m a
return ((Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      (Text,
       Maybe
         (MultiRWST
            '[Config, Anns]
            '[[BrittanyError], Seq String]
            '[NodeAllocIndex]
            Identity
            BriDocNumbered)))
-> (Text,
    Maybe
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (Text,
      Maybe
        (MultiRWST
           '[Config, Anns]
           '[[BrittanyError], Seq String]
           '[NodeAllocIndex]
           Identity
           BriDocNumbered))
forall a b. (a -> b) -> a -> b
$ (Located RdrName -> Text
forall l. GenLocated l RdrName -> Text
lrdrNameToText Located (IdP GhcPs)
Located RdrName
lrdrName, MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> Maybe
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall a. a -> Maybe a
Just (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> Maybe
      (MultiRWST
         '[Config, Anns]
         '[[BrittanyError], Seq String]
         '[NodeAllocIndex]
         Identity
         BriDocNumbered))
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> Maybe
     (MultiRWST
        '[Config, Anns]
        '[[BrittanyError], Seq String]
        '[NodeAllocIndex]
        Identity
        BriDocNumbered)
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
d)
  (L SrcSpan
_ (XTyVarBndr{})) -> String
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     (Text,
      Maybe
        (MultiRWST
           '[Config, Anns]
           '[[BrittanyError], Seq String]
           '[NodeAllocIndex]
           Identity
           BriDocNumbered))
forall a. HasCallStack => String -> a
error String
"brittany internal error: XTyVarBndr"

-- there is no specific reason this returns a list instead of a single
-- BriDoc node.
processTyVarBndrsSingleline
  :: [(Text, Maybe (ToBriDocM BriDocNumbered))] -> [ToBriDocM BriDocNumbered]
processTyVarBndrsSingleline :: [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
processTyVarBndrsSingleline [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
bndrDocs = [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
bndrDocs [(Text,
  Maybe
    (MultiRWST
       '[Config, Anns]
       '[[BrittanyError], Seq String]
       '[NodeAllocIndex]
       Identity
       BriDocNumbered))]
-> ((Text,
     Maybe
       (MultiRWST
          '[Config, Anns]
          '[[BrittanyError], Seq String]
          '[NodeAllocIndex]
          Identity
          BriDocNumbered))
    -> [MultiRWST
          '[Config, Anns]
          '[[BrittanyError], Seq String]
          '[NodeAllocIndex]
          Identity
          BriDocNumbered])
-> [MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \case
  (Text
tname, Maybe
  (MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered)
Nothing) -> [MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator, Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit Text
tname]
  (Text
tname, Just MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
doc) ->
    [ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
docSeparator
    , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
"(" Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> Text
tname Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> String -> Text
Text.pack String
" :: "
    , MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docForceSingleline (MultiRWST
   '[Config, Anns]
   '[[BrittanyError], Seq String]
   '[NodeAllocIndex]
   Identity
   BriDocNumbered
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ MultiRWST
  '[Config, Anns]
  '[[BrittanyError], Seq String]
  '[NodeAllocIndex]
  Identity
  BriDocNumbered
doc
    , Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
docLit (Text
 -> MultiRWST
      '[Config, Anns]
      '[[BrittanyError], Seq String]
      '[NodeAllocIndex]
      Identity
      BriDocNumbered)
-> Text
-> MultiRWST
     '[Config, Anns]
     '[[BrittanyError], Seq String]
     '[NodeAllocIndex]
     Identity
     BriDocNumbered
forall a b. (a -> b) -> a -> b
$ String -> Text
Text.pack String
")"
    ]