convertible-text and attempt package split

This commit is contained in:
Michael Snoyman 2009-12-06 00:46:59 +02:00
parent 9483f6037e
commit 5cf6a92c02
7 changed files with 10 additions and 9 deletions

View File

@ -27,7 +27,7 @@ import Web.Encodings (encodeJson)
import Text.Yaml (encodeText)
import qualified Data.Text.Lazy as LT
import Data.Text.Lazy (Text)
import Data.Convertible
import Data.Convertible.Text
newtype Json = Json { unJson :: Text }
instance ConvertAttempt (Object Text Text) Json where

View File

@ -31,7 +31,7 @@ module Data.Object.Translate
import Data.Maybe (fromMaybe)
import Data.Object
import Data.Attempt
import Control.Monad.Attempt
import Data.Object.Text
-- | Should usually be the well established I18N translation code. Examples

View File

@ -43,7 +43,7 @@ import Web.Restful.Definitions
import Web.Restful.Constants
import Web.Restful.Resource
import Data.Convertible
import Data.Convertible.Text
import Control.Arrow ((***))
-- | A data type that can be turned into a Hack application.

View File

@ -54,11 +54,12 @@ type HandlerT m =
type HandlerIO = HandlerT IO
type Handler = HandlerIO [RepT HandlerIO]
-- FIXME shouldn't call error here...
instance MonadRequestReader HandlerIO where
askRawRequest = ask
invalidParam _pt _pn _pe = error "invalidParam"
authRequired = error "authRequired"
instance Exception e => MonadFailure e HandlerIO where
instance Exception e => Failure e HandlerIO where
failure = error "HandlerIO failure"
class ToHandler a where

View File

@ -34,7 +34,7 @@ import Control.Monad.Reader
import Control.Monad.Attempt
import Data.Maybe (fromMaybe)
import Data.Attempt
import Control.Monad.Attempt
data AuthResource =
Check

View File

@ -65,7 +65,7 @@ import Test.Framework (testGroup, Test)
import Data.Generics
import Control.Exception (Exception)
import Data.Maybe (fromJust)
import Data.Convertible
import Data.Convertible.Text
import Data.Text.Lazy (Text)

View File

@ -25,7 +25,7 @@ library
time >= 1.1.3 && < 1.2,
hack >= 2009.5.19,
split >= 0.1.1 && < 0.2,
authenticate >= 0.2.1 && < 0.3,
authenticate >= 0.4.0 && < 0.5,
data-default >= 0.2 && < 0.3,
predicates >= 0.1 && < 0.2,
bytestring >= 0.9.1.4 && < 0.10,
@ -36,10 +36,10 @@ library
directory >= 1 && < 1.1,
transformers >= 0.1.4.0 && < 0.2,
monads-fd >= 0.0.0.1 && < 0.1,
attempt >= 0.0.2 && < 0.1,
control-monad-attempt >= 0.0.0 && < 0.1,
syb,
text >= 0.5 && < 0.6,
convertible >= 1.2.0 && < 1.3,
convertible-text >= 0.0.0 && < 0.1,
clientsession >= 0.0.1 && < 0.1,
zlib >= 0.5.2.0 && < 0.6
exposed-modules: Web.Restful,