diff --git a/Web/Scotty/Internal/Types.hs b/Web/Scotty/Internal/Types.hs index 73b6a0f..d0e3571 100644 --- a/Web/Scotty/Internal/Types.hs +++ b/Web/Scotty/Internal/Types.hs @@ -29,7 +29,6 @@ import qualified Control.Monad.Trans.Resource as RT (InternalState, InvalidAcces import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy.Char8 as LBS8 (ByteString) -import Data.Default.Class (Default, def) import Data.String (IsString(..)) import qualified Data.Text as T (Text, pack) import Data.Typeable (Typeable) @@ -58,18 +57,12 @@ data Options = Options { verbose :: Int -- ^ 0 = silent, 1(def) = startup banner -- servers using `setFdCacheDuration`. } -instance Default Options where - def = defaultOptions - defaultOptions :: Options defaultOptions = Options 1 W.defaultSettings newtype RouteOptions = RouteOptions { maxRequestBodySize :: Maybe Kilobytes -- max allowed request size in KB } -instance Default RouteOptions where - def = defaultRouteOptions - defaultRouteOptions :: RouteOptions defaultRouteOptions = RouteOptions Nothing @@ -100,9 +93,6 @@ data ScottyState m = , routeOptions :: RouteOptions } --- instance Default (ScottyState m) where --- def = defaultScottyState - defaultScottyState :: ScottyState m defaultScottyState = ScottyState [] [] Nothing defaultRouteOptions @@ -231,8 +221,6 @@ setHeaderWith f sr = sr { srHeaders = f (srHeaders sr) } setStatus :: Status -> ScottyResponse -> ScottyResponse setStatus s sr = sr { srStatus = s } -instance Default ScottyResponse where - def = defaultScottyResponse -- | The default response has code 200 OK and empty body defaultScottyResponse :: ScottyResponse diff --git a/changelog.md b/changelog.md index 76a00c1..a30badd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,11 @@ ## next [????.??.??] +### Breaking changes +* Remove dependency on data-default class (#386). We have been exporting constants for default config values since 0.20, and this dependency was simply unnecessary. + + + ## 0.22 [2024.03.09] ### New diff --git a/scotty.cabal b/scotty.cabal index cc1f9e9..bc85be8 100644 --- a/scotty.cabal +++ b/scotty.cabal @@ -76,7 +76,6 @@ Library bytestring >= 0.10.0.2 , case-insensitive >= 1.0.0.1 && < 1.3, cookie >= 0.4, - data-default-class >= 0.1, exceptions >= 0.7 && < 0.11, http-types >= 0.9.1 && < 0.13, monad-control >= 1.0.0.3 && < 1.1,