Slimmed down dependencies

This commit is contained in:
Michael Snoyman 2010-04-21 18:07:03 -07:00
parent dcf9208cf5
commit fa98452452
3 changed files with 11 additions and 18 deletions

View File

@ -25,10 +25,9 @@ import Yesod.Handler
import Control.Applicative hiding (optional)
import Data.Time (Day)
import Data.Convertible.Text
import Data.Attempt
import Control.Monad.Attempt
import Data.Maybe (fromMaybe)
import "transformers" Control.Monad.IO.Class (MonadIO)
import qualified Safe.Failure
noParamNameError :: String
noParamNameError = "No param name (miscalling of Yesod.Form library)"
@ -118,9 +117,9 @@ checkBool = applyForm $ \pv -> Right $ case pv of
checkInteger :: Form ParamValue -> Form Integer
checkInteger = applyForm $ \pv ->
case Safe.Failure.read pv of
Nothing -> Left "Invalid integer"
Just i -> Right i
case reads pv of
[] -> Left "Invalid integer"
((i, _):_) -> Right i
-- | Instead of calling 'failure' with an 'InvalidArgs', return the error
-- messages.

View File

@ -39,7 +39,6 @@ module Yesod.Request
) where
import qualified Network.Wai as W
import Data.Function.Predicate (equals)
import Yesod.Definitions
import Web.Encodings
import qualified Data.ByteString as B
@ -119,7 +118,10 @@ iothunk = fmap go . newMVar . Left where
-- | All cookies with the given name.
cookies :: Request -> ParamName -> [ParamValue]
cookies rr name = map snd . filter (fst `equals` name) . reqCookies $ rr
cookies rr name =
map snd . filter (fst `equals` name) . reqCookies $ rr
where
equals f x y = f y == x
parseWaiRequest :: W.Request
-> [(B.ByteString, B.ByteString)] -- ^ session

View File

@ -37,27 +37,19 @@ library
else
Buildable: True
build-depends: base >= 4 && < 5,
old-locale >= 1.0.0.1 && < 1.1,
time >= 1.1.3 && < 1.2,
wai >= 0.0.0 && < 0.1,
wai-extra >= 0.0.0 && < 0.1,
split >= 0.1.1 && < 0.2,
wai >= 0.2.0 && < 0.3,
wai-extra >= 0.0.0 && < 0.3,
authenticate >= 0.6 && < 0.7,
predicates >= 0.1 && < 0.2,
bytestring >= 0.9.1.4 && < 0.10,
web-encodings >= 0.2.4 && < 0.3,
web-encodings >= 0.2.4 && < 0.5,
data-object >= 0.2.0 && < 0.3,
directory >= 1 && < 1.1,
transformers >= 0.2.0 && < 0.3,
control-monad-attempt >= 0.2.0 && < 0.3,
syb,
text >= 0.5 && < 0.8,
convertible-text >= 0.2.0 && < 0.3,
data-object-json >= 0.0.0 && < 0.1,
attempt >= 0.2.1 && < 0.3,
template-haskell,
failure >= 0.0.0 && < 0.1,
safe-failure >= 0.4.0 && < 0.5,
web-routes >= 0.22 && < 0.23,
web-routes-quasi >= 0.0 && < 0.1,
hamlet >= 0.0 && < 0.1