Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- parseRoute :: FilePath -> Domain -> Port -> IO RouteDB
- type RouteDB = [Block]
- data Route
- data Block = Block [Domain] [Route]
- type Src = Path
- type Dst = Path
- type Domain = ByteString
- type Port = Int
- data RouteDBRef
- newRouteDBRef :: RouteDB -> IO RouteDBRef
- readRouteDBRef :: RouteDBRef -> IO RouteDB
- writeRouteDBRef :: RouteDBRef -> RouteDB -> IO ()
Paring a routing file
:: FilePath | |
-> Domain | A default domain, typically "localhost" |
-> Port | A default port, typically 80. |
-> IO RouteDB |
Parsing a route file.
Types
type Domain = ByteString Source #
RouteDBRef
data RouteDBRef Source #
newRouteDBRef :: RouteDB -> IO RouteDBRef Source #
readRouteDBRef :: RouteDBRef -> IO RouteDB Source #
writeRouteDBRef :: RouteDBRef -> RouteDB -> IO () Source #