add Show, Eq and Ord for BaseUrl

This commit is contained in:
Sönke Hahn 2014-11-05 20:10:46 +08:00
parent f0bca3852c
commit 0e9d075ab4

View file

@ -15,12 +15,14 @@ import System.IO.Unsafe
-- * Accessing APIs as a Client
data Scheme = Http | Https
deriving (Show, Eq, Ord)
data BaseUrl = BaseUrl {
baseUrlScheme :: Scheme,
baseUrlHost :: String,
baseUrlPort :: Int
}
deriving (Show, Eq, Ord)
httpBaseUrl :: String -> BaseUrl
httpBaseUrl host = BaseUrl Http host 80