Hoogle Search
Within LTS Haskell 24.48 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
foreignConstraintNameDBName :: ForeignDef -> !ConstraintNameDBclassy-prelude-yesod ClassyPrelude.Yesod No documentation available.
foreignConstraintNameHaskell :: ForeignDef -> !ConstraintNameHSclassy-prelude-yesod ClassyPrelude.Yesod No documentation available.
foreignFieldCascade :: ForeignDef -> !FieldCascadeclassy-prelude-yesod ClassyPrelude.Yesod Determine how the field will cascade on updates and deletions.
foreignFields :: ForeignDef -> ![(ForeignFieldDef, ForeignFieldDef)]classy-prelude-yesod ClassyPrelude.Yesod No documentation available.
foreignNullable :: ForeignDef -> Boolclassy-prelude-yesod ClassyPrelude.Yesod No documentation available.
foreignRefTableDBName :: ForeignDef -> !EntityNameDBclassy-prelude-yesod ClassyPrelude.Yesod No documentation available.
foreignRefTableHaskell :: ForeignDef -> !EntityNameHSclassy-prelude-yesod ClassyPrelude.Yesod No documentation available.
foreignToPrimary :: ForeignDef -> Boolclassy-prelude-yesod ClassyPrelude.Yesod Determines if the reference is towards a Primary Key or not.
forever :: Applicative f => f a -> f bclassy-prelude-yesod ClassyPrelude.Yesod Repeat an action indefinitely.
Examples
A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan). For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:echoServer :: Socket -> IO () echoServer socket = forever $ do client <- accept socket forkFinally (echo client) (\_ -> hClose client) where echo :: Handle -> IO () echo client = forever $ hGetLine client >>= hPutStrLn client
Note that "forever" isn't necessarily non-terminating. If the action is in a MonadPlus and short-circuits after some number of iterations. then forever actually returns mzero, effectively short-circuiting its caller.forkHandler :: (SomeException -> HandlerFor site ()) -> HandlerFor site () -> HandlerFor site ()classy-prelude-yesod ClassyPrelude.Yesod forkIO for a Handler (run an action in the background) Uses handlerToIO, liftResourceT, and resourceForkIO for correctness and efficiency