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 -- * 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