module Network.MoHWS.Initialization.Standard (Extension, init, ) where
import qualified Network.MoHWS.Module.Description as ModuleDesc
import qualified Network.MoHWS.Initialization as Init
import qualified Network.MoHWS.Stream as Stream
import qualified Data.Accessor.Basic as Accessor
import qualified Network.MoHWS.Part.UserDirectory as UserDir
import qualified Network.MoHWS.Part.VirtualHost as VirtualHost
import qualified Network.MoHWS.Part.AddSlash as AddSlash
import qualified Network.MoHWS.Part.Index as Index
import qualified Network.MoHWS.Part.CGI as CGI
import qualified Network.MoHWS.Part.File as File
import qualified Network.MoHWS.Part.Listing as Listing
import Prelude hiding (init, )
data Extension =
Extension {
Extension -> Configuration
userDir :: UserDir.Configuration,
Extension -> Configuration
virtualHost :: VirtualHost.Configuration,
Extension -> Configuration
addSlash :: AddSlash.Configuration,
Extension -> Configuration
index :: Index.Configuration,
Extension -> Configuration
cgi :: CGI.Configuration,
Extension -> Configuration
file :: File.Configuration,
Extension -> Configuration
listing :: Listing.Configuration
}
lift ::
(partExt -> fullExt -> fullExt) -> (fullExt -> partExt) ->
ModuleDesc.T body partExt -> ModuleDesc.T body fullExt
lift :: (partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift partExt -> fullExt -> fullExt
set fullExt -> partExt
get =
T fullExt partExt -> T body partExt -> T body fullExt
forall fullExt partExt body.
T fullExt partExt -> T body partExt -> T body fullExt
ModuleDesc.lift ((partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T fullExt partExt
forall a r. (a -> r -> r) -> (r -> a) -> T r a
Accessor.fromSetGet partExt -> fullExt -> fullExt
set fullExt -> partExt
get)
moduleList :: (Stream.C body) => [ModuleDesc.T body Extension]
moduleList :: [T body Extension]
moduleList =
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{userDir :: Configuration
userDir = Configuration
x}) Extension -> Configuration
userDir T body Configuration
forall body. T body Configuration
UserDir.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{virtualHost :: Configuration
virtualHost = Configuration
x}) Extension -> Configuration
virtualHost T body Configuration
forall body. T body Configuration
VirtualHost.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{addSlash :: Configuration
addSlash = Configuration
x}) Extension -> Configuration
addSlash T body Configuration
forall body. C body => T body Configuration
AddSlash.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{index :: Configuration
index = Configuration
x}) Extension -> Configuration
index T body Configuration
forall body. T body Configuration
Index.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{cgi :: Configuration
cgi = Configuration
x}) Extension -> Configuration
cgi T body Configuration
forall body. C body => T body Configuration
CGI.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{file :: Configuration
file = Configuration
x}) Extension -> Configuration
file T body Configuration
forall body. C body => T body Configuration
File.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
(Configuration -> Extension -> Extension)
-> (Extension -> Configuration)
-> T body Configuration
-> T body Extension
forall partExt fullExt body.
(partExt -> fullExt -> fullExt)
-> (fullExt -> partExt) -> T body partExt -> T body fullExt
lift (\Configuration
x Extension
ext -> Extension
ext{listing :: Configuration
listing = Configuration
x}) Extension -> Configuration
listing T body Configuration
forall body. C body => T body Configuration
Listing.desc T body Extension -> [T body Extension] -> [T body Extension]
forall a. a -> [a] -> [a]
:
[]
init :: (Stream.C body) => Init.T body Extension
init :: T body Extension
init =
Cons :: forall body ext. [T body ext] -> ext -> T body ext
Init.Cons {
moduleList :: [T body Extension]
Init.moduleList = [T body Extension]
forall body. C body => [T body Extension]
moduleList,
configurationExtensionDefault :: Extension
Init.configurationExtensionDefault =
Configuration
-> Configuration
-> Configuration
-> Configuration
-> Configuration
-> Configuration
-> Configuration
-> Extension
Extension
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized userDir extension")
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized virtualHost extension")
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized addSlash extension")
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized index extension")
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized cgi extension")
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized file extension")
([Char] -> Configuration
forall a. HasCallStack => [Char] -> a
error [Char]
"uninitialized listing extension")
}