Reduce dependencies

This commit is contained in:
Michael Snoyman 2017-01-03 12:42:45 +02:00
parent 6d3c530ab8
commit 38fec7f8b8
5 changed files with 14 additions and 12 deletions

View File

@ -1,3 +1,7 @@
## 1.4.4
* Reduce dependencies
## 1.4.3.1
* Handle exceptions while writing a file in `addStaticContentExternal`

View File

@ -38,7 +38,7 @@ import qualified Data.HashMap.Strict as H
import System.Environment (getEnvironment)
import Network.Wai (Application)
import Network.Wai.Handler.Warp
import Safe (readMay)
import Text.Read (readMaybe)
import Data.Maybe (fromMaybe)
import Control.Concurrent (forkIO, threadDelay)
import System.Exit (exitSuccess)
@ -96,8 +96,8 @@ configSettingsYml = "config/settings.yml"
getDevSettings :: Settings -> IO Settings
getDevSettings settings = do
env <- getEnvironment
let p = fromMaybe (getPort settings) $ lookup "PORT" env >>= readMay
pdisplay = fromMaybe p $ lookup "DISPLAY_PORT" env >>= readMay
let p = fromMaybe (getPort settings) $ lookup "PORT" env >>= readMaybe
pdisplay = fromMaybe p $ lookup "DISPLAY_PORT" env >>= readMaybe
putStrLn $ "Devel application launched: http://localhost:" ++ show pdisplay
return $ setPort p settings

View File

@ -22,7 +22,7 @@ import Network.Wai.Middleware.Jsonp (jsonp)
import Control.Monad (when)
import System.Environment (getEnvironment)
import Data.Maybe (fromMaybe)
import Safe (readMay)
import Text.Read (readMaybe)
import Control.Monad.Logger (Loc, LogSource, LogLevel (LevelError), liftLoc)
import System.Log.FastLogger (LogStr, toLogStr)
import Language.Haskell.TH.Syntax (qLocation)
@ -120,8 +120,8 @@ defaultDevelApp
defaultDevelApp load getApp = do
conf <- load
env <- getEnvironment
let p = fromMaybe (appPort conf) $ lookup "PORT" env >>= readMay
pdisplay = fromMaybe p $ lookup "DISPLAY_PORT" env >>= readMay
let p = fromMaybe (appPort conf) $ lookup "PORT" env >>= readMaybe
pdisplay = fromMaybe p $ lookup "DISPLAY_PORT" env >>= readMaybe
putStrLn $ "Devel application launched: http://localhost:" ++ show pdisplay
app <- getApp conf
return (p, app)

View File

@ -28,7 +28,7 @@ import Text.Julius (juliusFile, juliusFileReload)
import Text.Cassius (cassiusFile, cassiusFileReload)
import Text.Hamlet (HamletSettings, defaultHamletSettings)
import Data.Maybe (catMaybes)
import Data.Default (Default (def))
import Data.Default.Class (Default (def))
-- | An implementation of 'addStaticContent' which stores the contents in an
-- external file. Files are created in the given static folder with names based

View File

@ -1,5 +1,5 @@
name: yesod
version: 1.4.3.1
version: 1.4.4
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>
@ -17,9 +17,8 @@ library
if os(windows)
cpp-options: -DWINDOWS
build-depends: base >= 4.3 && < 5
build-depends: base >= 4.6 && < 5
, yesod-core >= 1.4 && < 1.5
, yesod-auth >= 1.4 && < 1.5
, yesod-persistent >= 1.4 && < 1.5
, yesod-form >= 1.4 && < 1.5
, monad-control >= 0.3 && < 1.1
@ -30,8 +29,7 @@ library
, blaze-html >= 0.5
, blaze-markup >= 0.5.1
, aeson
, safe
, data-default
, data-default-class
, unordered-containers
, yaml >= 0.8.17
, text