{-# LANGUAGE DeriveDataTypeable #-}
module Network.HTTP.Types.Version
(
HttpVersion(..)
, http09
, http10
, http11
, http20
)
where
import Data.Typeable
data HttpVersion
= HttpVersion {
httpMajor :: !Int
, httpMinor :: !Int
}
deriving (Eq, Ord, Typeable)
instance Show HttpVersion where
show (HttpVersion major minor) = "HTTP/" ++ show major ++ "." ++ show minor
http09 :: HttpVersion
http09 = HttpVersion 0 9
http10 :: HttpVersion
http10 = HttpVersion 1 0
http11 :: HttpVersion
http11 = HttpVersion 1 1
http20 :: HttpVersion
http20 = HttpVersion 2 0