Fix for GHC-7.8.x
This commit is contained in:
parent
520519bca9
commit
3bcbe80c37
2 changed files with 8 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
module Servant.Common.BaseUrl (
|
||||
|
@ -12,6 +13,7 @@ module Servant.Common.BaseUrl (
|
|||
|
||||
import Control.Monad.Catch (MonadThrow, throwM, Exception)
|
||||
import Data.List
|
||||
import Data.Typeable
|
||||
import GHC.Generics
|
||||
import Network.URI
|
||||
import Safe
|
||||
|
@ -43,7 +45,7 @@ showBaseUrl (BaseUrl urlscheme host port) =
|
|||
(Https, 443) -> ""
|
||||
_ -> ":" ++ show port
|
||||
|
||||
newtype InvalidBaseUrlException = InvalidBaseUrlException { _getInvalidUrlException :: String } deriving Show
|
||||
data InvalidBaseUrlException = InvalidBaseUrlException String deriving (Show, Typeable)
|
||||
instance Exception InvalidBaseUrlException
|
||||
|
||||
parseBaseUrl :: MonadThrow m => String -> m BaseUrl
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{-# LANGUAGE AutoDeriveTypeable #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
|
@ -19,6 +19,7 @@ import Data.String.Conversions
|
|||
import Data.Proxy
|
||||
import Data.Text (Text)
|
||||
import Data.Text.Encoding
|
||||
import Data.Typeable
|
||||
import Network.HTTP.Client hiding (Proxy)
|
||||
import Network.HTTP.Client.TLS
|
||||
import Network.HTTP.Media
|
||||
|
@ -54,7 +55,7 @@ data ServantError
|
|||
{ responseContentTypeHeader :: ByteString
|
||||
, responseBody :: ByteString
|
||||
}
|
||||
deriving (Show)
|
||||
deriving (Show, Typeable)
|
||||
|
||||
instance Exception ServantError
|
||||
|
||||
|
|
Loading…
Reference in a new issue