on master help sign in
Fix for GHC-7.8.x
commit3bcbe80c378697bc3ef131fbf1b4403c42c41d80 authorPierre Radermecker <pierrer@pi3r.be> dateWed 27 May 2015, 22:25 (11 years ago) parent520519b
2 files changed+8−5
servant-client/src/Servant/Common/BaseUrl.hs+5−3 servant-client/src/Servant/Common/Req.hs+3−2
servant-client/src/Servant/Common/BaseUrl.hs+5−3
@@ -1,5 +1,6 @@
1−{-# LANGUAGE DeriveGeneric #-}
2−{-# LANGUAGE ViewPatterns #-}
1+{-# LANGUAGE DeriveDataTypeable #-}
2+{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE ViewPatterns #-}
34module Servant.Common.BaseUrl (
45 -- * types
56 BaseUrl (..)
@@ -12,6 +13,7 @@ module Servant.Common.BaseUrl (
1213
1314import Control.Monad.Catch (MonadThrow, throwM, Exception)
1415import Data.List
16+import Data.Typeable
1517import GHC.Generics
1618import Network.URI
1719import Safe
@@ -43,7 +45,7 @@ showBaseUrl (BaseUrl urlscheme host port) =
4345 (Https, 443) -> ""
4446 _ -> ":" ++ show port
4547
46−newtype InvalidBaseUrlException = InvalidBaseUrlException { _getInvalidUrlException :: String } deriving Show
48+data InvalidBaseUrlException = InvalidBaseUrlException String deriving (Show, Typeable)
4749instance Exception InvalidBaseUrlException
4850
4951parseBaseUrl :: MonadThrow m => String -> m BaseUrl
servant-client/src/Servant/Common/Req.hs+3−2
@@ -1,4 +1,4 @@
1−{-# LANGUAGE AutoDeriveTypeable #-}
1+{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE CPP #-}
33{-# LANGUAGE OverloadedStrings #-}
44{-# LANGUAGE ScopedTypeVariables #-}
@@ -19,6 +19,7 @@ import Data.String.Conversions
1919import Data.Proxy
2020import Data.Text (Text)
2121import Data.Text.Encoding
22+import Data.Typeable
2223import Network.HTTP.Client hiding (Proxy)
2324import Network.HTTP.Client.TLS
2425import Network.HTTP.Media
@@ -54,7 +55,7 @@ data ServantError
5455 { responseContentTypeHeader :: ByteString
5556 , responseBody :: ByteString
5657 }
57− deriving (Show)
58+ deriving (Show, Typeable)
5859
5960instance Exception ServantError
6061