HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleyesod-1.6.2.3Haskell2010

Yesod.Default.Main

  • 1 type
  • 4 values
  • Packageyesod-1.6.2.3
  • Exports5
  • LanguageHaskell2010
  • LicenceMIT
  • SourceMain.hs
valuedefaultMain
  1. :: IO (AppConfig env extra)
  2. -> AppConfig env extra -> IO Application
  3. -> IO ()
#

Run your app, taking environment and port settings from the commandline.

fromArgs helps parse a custom configuration

main :: IO ()
main = defaultMain (fromArgs parseExtra) makeApplication
valuedefaultRunner :: (Application -> IO ()) -> Application -> IO ()
#

Run your application continuously, listening for SIGINT and exiting when received

withYourSite :: AppConfig DefaultEnv -> Logger -> (Application -> IO a) -> IO ()
withYourSite conf logger f = do
    Settings.withConnectionPool conf $ \p -> do
        runConnectionPool (runMigration yourMigration) p
        defaultRunner f $ YourSite conf logger p