Add Generic to reexports, improve closing messages
This commit is contained in:
parent
9ea195ea17
commit
0ace3c0797
@ -13,6 +13,7 @@ module HTTPurple
|
|||||||
, module Routing.Duplex
|
, module Routing.Duplex
|
||||||
, module Routing.Duplex.Generic
|
, module Routing.Duplex.Generic
|
||||||
, module Routing.Duplex.Generic.Syntax
|
, module Routing.Duplex.Generic.Syntax
|
||||||
|
, module Data.Generic.Rep
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import HTTPurple.Body (toBuffer, toStream, toString)
|
import HTTPurple.Body (toBuffer, toStream, toString)
|
||||||
@ -29,3 +30,4 @@ import HTTPurple.Status (Status)
|
|||||||
import Routing.Duplex (class RouteDuplexBuildParams, class RouteDuplexParams, RouteDuplex(..), RouteDuplex', as, boolean, buildParams, default, end, flag, int, many, many1, optional, param, params, parse, path, prefix, print, prop, record, rest, root, segment, string, suffix, (:=))
|
import Routing.Duplex (class RouteDuplexBuildParams, class RouteDuplexParams, RouteDuplex(..), RouteDuplex', as, boolean, buildParams, default, end, flag, int, many, many1, optional, param, params, parse, path, prefix, print, prop, record, rest, root, segment, string, suffix, (:=))
|
||||||
import Routing.Duplex.Generic (class GRouteDuplex, class GRouteDuplexCtr, noArgs, product, sum, (~))
|
import Routing.Duplex.Generic (class GRouteDuplex, class GRouteDuplexCtr, noArgs, product, sum, (~))
|
||||||
import Routing.Duplex.Generic.Syntax (gparams, gsep, (/), (?))
|
import Routing.Duplex.Generic.Syntax (gparams, gsep, (/), (?))
|
||||||
|
import Data.Generic.Rep (class Generic)
|
||||||
|
@ -150,8 +150,8 @@ serve inputOptions { route, router } = do
|
|||||||
case filledOptions.closingHandler of
|
case filledOptions.closingHandler of
|
||||||
Just NoClosingHandler -> pure closingHandler
|
Just NoClosingHandler -> pure closingHandler
|
||||||
_ -> do
|
_ -> do
|
||||||
onSignal SIGINT $ closingHandler $ log "Received SIGINT, stopping service now."
|
onSignal SIGINT $ closingHandler $ log "Ok, ok, stopping the service now. Goodbye!"
|
||||||
onSignal SIGTERM $ closingHandler $ log "Received SIGTERM, stopping service now."
|
onSignal SIGTERM $ closingHandler $ log "Arrgghh I got stabbed in the back 🗡 ... good...bye..."
|
||||||
pure closingHandler
|
pure closingHandler
|
||||||
|
|
||||||
defaultHostname :: String
|
defaultHostname :: String
|
||||||
|
Loading…
Reference in New Issue
Block a user