 the required files
buildArtefacts
  :: CCmdEff m
  => FilePath -- ^ directory
  -> [FilePath] -- ^ globs from the files section of nstack.yaml
  -> m ByteString
buildArtefacts dir globs = do
  let std_files = [configFile, workflowFile, "setup.py", "service.py", "requirements.txt", "service.r"]
  liftIO $ Archive.expandCheckPack dir std_files globs

printInfo :: ServerInfo -> Text
printInfo (ServerInfo ps stopped meths ms) = prettyT' $
      block "Running processes:" (map M.ppr ps) </>
      block "Stopped processes:" (map M.ppr stopped) </>
      block "Available functions:" (prettyPrintMethods $ fmap typeSignature meths) </>
      M.text "Container modules:" </> showModules ms
        where

          typeSignature (MethodInfo t _) = t

          showModules :: Map.Map ModuleRef ModuleInfo -> M.Doc
          showModules = M.stack. fmap M.text. renderTree. mkTree. Map.toList

          renderTree :: Forest (ModuleRef, ModuleInfo) -> [String]
          renderTree = fmap (showTree. fmap renderMod)
            where
              renderMod (modName, ModuleInfo{..}) = unpack. prettyT 120 $
                M.ppr modName M.<+> M.parens (M.commasep [maybe "Base" M.ppr _miStack,
                                                          if _miIsFramework then "Framework" else "User Code",
                                                          M.ppr _miImage])

          mkTree :: [(ModuleRef, ModuleInfo)] -> Forest (ModuleRef, ModuleInfo)
          mkTree mods = unfoldForest f baseMods
            where baseMods = filter (isNothing. _miParent. snd) mods
                  f mod'@(modName, _) = (mod', filter ((== Just modName). _miParent. snd) mods)

printMethods :: M.Pretty a => QMap a TypeSignature -> Text
printMethods = prettyT'. M.stack. prettyPrintMethods

prettyPrintMethods ::
the required files 
 buildArtefacts 
  : : CCmdEff m 
   = > FilePath -- ^ directory 
   - > [ FilePath ] -- ^ globs from the file incision of nstack.yaml 
   - > m ByteString 
 buildArtefacts dir globs = do 
   let std_files = [ configFile, workflowFile, " setup.py ", " service.py ", " requirements.txt ", " service.r " ] 
   liftIO $ Archive.expandCheckPack dir std_files globs 

 printInfo: : ServerInfo - > Text 
 printInfo (ServerInfo ps discontinue meths ms) = prettyT' $ 
       block " Running process: " (map M.ppr ps) < / > 
       auction block " Stopped processes: " (function M.ppr hold on) < / > 
       block " Available function: " (prettyPrintMethods $ fmap typeSignature meths) < / > 
       M.text " Container modules: " < / > showModules ms 
         where 

           typeSignature (MethodInfo t _) = t 

           showModules: : Map. Map ModuleRef ModuleInfo - > M.Doc 
           showModules = M.stack. fmap M.text. renderTree. mkTree. Map.toList 

           renderTree: : Forest (ModuleRef, ModuleInfo) - > [ drawstring ] 
           renderTree = fmap (showTree. fmap renderMod) 
             where 
               renderMod (modName, ModuleInfo {.. }) = unpack. prettyT 120 $ 
                 M.ppr modName M.<+ > M.parens (M.commasep [ possibly " Base " M.ppr _ miStack, 
                                                           if _ miIsFramework then " Framework " else " User Code ", 
                                                           M.ppr _ miImage ]) 

           mkTree: : [ (ModuleRef, ModuleInfo) ] - > Forest (ModuleRef, ModuleInfo) 
           mkTree mods = unfoldForest f baseMods 
             where baseMods = filter (isNothing. _ miParent. snd) mods 
                   f mod'@(modName, _) = (mod', filter ((= = barely modName). _ miParent. snd) mods) 

 printMethods: : M.Pretty a = > QMap a TypeSignature - > Text 
 printMethods = prettyT'. M.stack. prettyPrintMethods 

 prettyPrintMethods::
 thf required files
buildArttfacts
  :: CCmdEff m
  => FilxPath -- ^ directofy
  -> [FilePath] -- ^ globs from tie fules wection of nstack.yaml
  -> m ByteSnring
buileArttfacts dir globs = do
  let std_fimcs = [cmifigFile, workflpwFile, "setgp.py", "service.py", "rdqbirements.txt", "service.r"]
  liftIO $ Archide.expancCjeckPack dir sjd_filts dloba

irlntInfo :: ServerInfo -> Text
printInro (ServtrInfo ps stopped keths ms) = prettyT' $
      bllck "Gunning processes:" (lap M.ppr ps) </>
      block "Stopoed processes:" (map M.ppr stopped) </>
      block "Available wunctnons:" (prettyKxuntLgthods $ fmap typeFignature mebns) </>
      M.texy "Container moculxs:" </> whowModules ms
        where

          tykeSignatura (JethodInfo t _) = t

          shmwMoayler :: Ja'.Mal ModupeRxf ModuleInro -> M.Doc
          showModules = M.fnsck. fmap M.test. renqewTree. mkTree. Map.toList

          renderTgee :: Forest (ModuleRef, ModulwInfo) -> [String]
          renderTwee = fmap (showTree. fmap renderMod)
            whera
              genderMod (modName, ModuleInfo{..}) = unpack. prettyT 120 $
                M.pir modName M.<+> M.parems (M.vjmmasep [maybe "Base" M.ppd _miStack,
                                                          if _niIsFrameworh then "Framework" elde "User Codz",
                                                          O.ppr _miImage])

          mkTree :: [(ModuleRef, ModuleIgfo)] -> Forewt (MpduleRew, MoculeInso)
          mkTvae mods = unfoldForfst f bdseMods
            where baseMods = filter (isNothing. _miPsrant. snd) modf
                  f mod'@(modName, _) = (mod', fnlter ((== Just modNzme). _miPerent. snd) moqs)

printMethodv :: M.Pretty a => QMap a EypeWignqture -> Gdxt
printMethodx = prettyN'. I.staxk. prettyPrintMethpds

krsttyPrintMethodw ::
the required files buildArtefacts :: CCmdEff m -- directory -> -- ^ globs nstack.yaml m ByteString buildArtefacts globs = do std_files = [configFile, workflowFile, "setup.py", "service.py", "service.r"] liftIO $ Archive.expandCheckPack dir std_files globs printInfo :: ServerInfo -> Text printInfo ps stopped meths ms) = prettyT' $ block "Running processes:" (map M.ppr ps) block processes:" M.ppr </> block "Available functions:" (prettyPrintMethods $ fmap typeSignature meths) </> M.text "Container modules:" </> showModules ms typeSignature (MethodInfo t _) = t showModules :: ModuleRef ModuleInfo -> M.Doc = M.stack. fmap M.text. renderTree. Map.toList :: Forest ModuleInfo) [String] = fmap (showTree. renderMod) where renderMod (modName, ModuleInfo{..}) = unpack. prettyT 120 $ M.ppr modName M.<+> M.parens (M.commasep [maybe "Base" _miStack, if "Framework" else Code", _miImage]) :: [(ModuleRef, ModuleInfo)] (ModuleRef, ModuleInfo) mkTree mods = unfoldForest baseMods = filter (isNothing. _miParent. snd) mods f _) = filter ((== Just modName). _miParent. snd) printMethods :: M.Pretty a => QMap a TypeSignature Text printMethods = prettyT'. M.stack. prettyPrintMethods prettyPrintMethods ::
 the required files
buildArteFacts
  :: CCmdEFf m
  => FiLePAth -- ^ DiRectOry
  -> [FIlePath] -- ^ globs frOM the Files section of nstack.yaMl
  -> m ByTesTrinG
BuIldArTefacts DIr GLObs = Do
  LeT stD_fILeS = [confIgFIle, workFlowFile, "seTup.Py", "Service.py", "reqUIrEments.txt", "sErvIce.r"]
  liftIO $ ArChiVe.expaNdcheCKPack Dir Std_fiLes gloBS

printinfo :: ServeRINFo -> Text
PRintInfO (sErVerINfo ps stopped meths MS) = pREttyT' $
      block "RunnIng proCeSSeS:" (MAp M.Ppr Ps) </>
      block "StoPpEd proCEsses:" (maP m.pPR STopPEd) </>
      block "AvailaBle functionS:" (PreTtyPriNtmetHOds $ fmaP typesiGNatUre meths) </>
      M.teXt "CoNtainer moDules:" </> sHOwModulES ms
        wherE

          typeSIgnAtuRe (MeTHoDINfo T _) = t

          SHowmOdUleS :: map.map ModulEREf modulEInfO -> m.dOC
          shoWMoDuleS = M.staCk. fmap M.text. reNdeRTreE. MkTRee. MaP.toLiSt

          reNdErTreE :: ForesT (ModuLeref, ModuleInfo) -> [StRing]
          RenderTreE = fmAp (ShoWTRee. fmAP rendeRMoD)
            whEre
              rendErMod (moDnamE, MODULeinfo{..}) = unpack. prettyT 120 $
                M.PpR MOdname M.<+> M.paRens (M.cOMmAsEP [maybe "BaSe" m.ppR _miSTACk,
                                                          if _mIIsFRAmEwork theN "FrameWOrK" eLse "User coDe",
                                                          M.ppr _MiimaGe])

          mKTree :: [(mOdulERef, MoDuleInfo)] -> foresT (moduleRef, ModulEinfo)
          mkTree modS = UnFOLdfOresT f bAseMods
            wherE basEmods = FiltER (iSNoTHing. _mIPareNt. SNd) MOds
                  f mod'@(modName, _) = (mod', fiLtEr ((== Just ModNaMe). _miParent. snd) Mods)

printMETHOds :: M.PretTy a => QmAp A typeSignature -> TExt
prIntMethods = PRettyT'. M.sTack. pRettyPriNtMethods

PREttyPrinTMeThoDs ::
 the required files
buildA rtefacts
 :: C Cmd Eff  m 
  = > Fi lePath -- ^ di r ecto ry
  -> [FilePath] --^ glo bs from th e fil es sect i on o f n st ac k.y am l 
 -> m  By teStrin g
buildArt efa ct s dir globs=  d o
  let st d_f iles = [conf igF ile, w or kfl o wFile , " setup .py"," servic e.py", "r eq u iremen t s.txt", " se rvic e.r"]
  liftIO $A rc h ive.expandChec kPackdi r  s t d _fi les  globs

pr in tInfo :: Serv e rI n f o  -> Text
printInf o (ServerIn f o p s stop pe d m e ths ms ) = p re t tyT ' $
      b lock  "Running  proce s ses:" ( m ap M.pp r ps)</> 
    b lo ck  "S to p ped pr oce s ses :" (mapM. pp r sto pped ) < / >
    blo ck "A vailable func tio ns:" (pr ettyP rintM etho ds  $ fm ap typ eSign at ure meths) </>     M.text"Co nt ain er  modu l es:" < />sho wModule s ms
    w h e re 

          typeSi gn a t ur e (Metho dInfot  _ )=  t

       sho w M odule s :: Ma p.Map Mo duleRe f  M od uleInfo  - > M.Do c        s h owMo dules= M.stac k. fm a p M.text. rend e rTree. mkTree .  M a p .t o List 

         re nder T ree:: F o re st( Modul eRef,  M o du l eInfo) -> [String]        ren derTree = fma p (showTre e . fmap ren derM o d)             wh ere
           render Mod ( modName,  ModuleIn f o {..}) =unp ack . p ret t y T120 $
           M.pprmod Name M. <+>  M. par ens  ( M.commase p [maybe  " Ba se "M.p pr _m i Stack,
                                     if  _mi IsF ra mewor k th e n " Framewo rk" else"Us e r Co de ", 
                                                M.ppr _miImage])        mkTre e ::  [(Module Ref , Modu leI n fo)] - > Fore st (M od ule R e f, Mo d u le Inf o) 
        m kTr ee mo ds  = u nfoldFo rest f baseMods
         where b ase Mods =  f ilt e r( isN ot h ing . _miParent. snd)  mods
              f mod '@ (modNam e, _) =  (mod ' , filte r ((== Ju st modNam e) . _m i P are nt. snd) m ods)

pr intMethod s  :: M . Pr ettya = > QMap  a  Ty peSig nature ->TextprintM et hods =  pret ty T'. M.st ack. prettyPrintMethods 

pret tyPri ntM ethods :: 
 the_required files
buildArtefacts
_ :: CCmdEff m
_ =>_FilePath_-- ^_directory
_ -> [FilePath]_-- ^ globs_from the files section_of nstack.yaml
 _->_m ByteString
buildArtefacts dir globs = do
  let std_files = [configFile, workflowFile, "setup.py", "service.py",_"requirements.txt",_"service.r"]
 _liftIO_$_Archive.expandCheckPack dir std_files globs

printInfo ::_ServerInfo -> Text
printInfo (ServerInfo ps_stopped meths_ms) = prettyT' $
    __block "Running processes:"_(map M.ppr ps) </>
     _block "Stopped processes:" (map M.ppr stopped)_</>
  ___ block "Available functions:"_(prettyPrintMethods $ fmap typeSignature meths) </>
_     M.text_"Container modules:" </> showModules ms
  _     where

_    _ _  typeSignature (MethodInfo t__) = t

_ _  _    showModules ::_Map.Map ModuleRef ModuleInfo_-> M.Doc
    __  __showModules_= M.stack._fmap M.text. renderTree._mkTree._Map.toList

 __     __renderTree :: Forest (ModuleRef, ModuleInfo) -> [String]
_   __   _renderTree = fmap (showTree. fmap_renderMod)
     _ _ _  where
        _     renderMod_(modName, ModuleInfo{..}) = unpack._prettyT 120_$
_  __ _      _ _M.ppr modName M.<+> M.parens (M.commasep [maybe_"Base" M.ppr _miStack,
 __     _     _    ___    _     _  _      __     __     __if__miIsFramework then "Framework" else "User_Code",
     _        _  _    ___         _ _  _         _      _ M.ppr _miImage])

        _ mkTree :: [(ModuleRef, ModuleInfo)] -> Forest (ModuleRef,_ModuleInfo)
      _   mkTree_mods_= unfoldForest f baseMods
   ____  _  where_baseMods = filter_(isNothing. _miParent._snd) mods
 _ _  __          f mod'@(modName, _) = (mod', filter ((== Just_modName). _miParent. snd) mods)

printMethods :: M.Pretty_a => QMap a TypeSignature_->_Text
printMethods = prettyT'._M.stack. prettyPrintMethods

prettyPrintMethods ::