+handlePut env
+ = do let sc = envSysConf env
+
+ userID <- getUserID env
+ case userID of
+ Nothing
+ -> setStatus Forbidden
+ Just uid
+ -> runXmlA env "rakka-config-1.0.rng" $ proc tree
+ -> do listA ( getXPathTreesInDoc "/systemConfig/value"
+ >>>
+ choiceA [ branch (undefined :: SiteName )
+ , branch (undefined :: BaseURI )
+ , branch (undefined :: DefaultPage)
+ , branch (undefined :: StyleSheet )
+ , branch (undefined :: Languages )
+ , branch (undefined :: GlobalLock )
+ ]
+ ) -< tree
+ returnA -< setStatus Ok
+ where
+ branch :: forall a c. (ArrowXml a, ArrowIO a, SysConfValue c) =>
+ c
+ -> IfThen (a XmlTree XmlTree) (a XmlTree StatusCode)
+ branch c
+ = hasAttrValue "path" (== confPath c)
+ :->
+ ( getChildren
+ >>> getText
+ >>> arr (fromJust . (deserialize :: String -> Maybe c))
+ >>> setSysConfA sc uid )
\ No newline at end of file