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