add Show, Eq and Ord for BaseUrl
This commit is contained in:
parent
f0bca3852c
commit
0e9d075ab4
1 changed files with 2 additions and 0 deletions
|
@ -15,12 +15,14 @@ import System.IO.Unsafe
|
||||||
-- * Accessing APIs as a Client
|
-- * Accessing APIs as a Client
|
||||||
|
|
||||||
data Scheme = Http | Https
|
data Scheme = Http | Https
|
||||||
|
deriving (Show, Eq, Ord)
|
||||||
|
|
||||||
data BaseUrl = BaseUrl {
|
data BaseUrl = BaseUrl {
|
||||||
baseUrlScheme :: Scheme,
|
baseUrlScheme :: Scheme,
|
||||||
baseUrlHost :: String,
|
baseUrlHost :: String,
|
||||||
baseUrlPort :: Int
|
baseUrlPort :: Int
|
||||||
}
|
}
|
||||||
|
deriving (Show, Eq, Ord)
|
||||||
|
|
||||||
httpBaseUrl :: String -> BaseUrl
|
httpBaseUrl :: String -> BaseUrl
|
||||||
httpBaseUrl host = BaseUrl Http host 80
|
httpBaseUrl host = BaseUrl Http host 80
|
||||||
|
|
Loading…
Reference in a new issue