convertible-text and attempt package split
This commit is contained in:
parent
9483f6037e
commit
5cf6a92c02
@ -27,7 +27,7 @@ import Web.Encodings (encodeJson)
|
|||||||
import Text.Yaml (encodeText)
|
import Text.Yaml (encodeText)
|
||||||
import qualified Data.Text.Lazy as LT
|
import qualified Data.Text.Lazy as LT
|
||||||
import Data.Text.Lazy (Text)
|
import Data.Text.Lazy (Text)
|
||||||
import Data.Convertible
|
import Data.Convertible.Text
|
||||||
|
|
||||||
newtype Json = Json { unJson :: Text }
|
newtype Json = Json { unJson :: Text }
|
||||||
instance ConvertAttempt (Object Text Text) Json where
|
instance ConvertAttempt (Object Text Text) Json where
|
||||||
|
|||||||
@ -31,7 +31,7 @@ module Data.Object.Translate
|
|||||||
|
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Object
|
import Data.Object
|
||||||
import Data.Attempt
|
import Control.Monad.Attempt
|
||||||
import Data.Object.Text
|
import Data.Object.Text
|
||||||
|
|
||||||
-- | Should usually be the well established I18N translation code. Examples
|
-- | Should usually be the well established I18N translation code. Examples
|
||||||
|
|||||||
@ -43,7 +43,7 @@ import Web.Restful.Definitions
|
|||||||
import Web.Restful.Constants
|
import Web.Restful.Constants
|
||||||
import Web.Restful.Resource
|
import Web.Restful.Resource
|
||||||
|
|
||||||
import Data.Convertible
|
import Data.Convertible.Text
|
||||||
import Control.Arrow ((***))
|
import Control.Arrow ((***))
|
||||||
|
|
||||||
-- | A data type that can be turned into a Hack application.
|
-- | A data type that can be turned into a Hack application.
|
||||||
|
|||||||
@ -54,11 +54,12 @@ type HandlerT m =
|
|||||||
type HandlerIO = HandlerT IO
|
type HandlerIO = HandlerT IO
|
||||||
type Handler = HandlerIO [RepT HandlerIO]
|
type Handler = HandlerIO [RepT HandlerIO]
|
||||||
|
|
||||||
|
-- FIXME shouldn't call error here...
|
||||||
instance MonadRequestReader HandlerIO where
|
instance MonadRequestReader HandlerIO where
|
||||||
askRawRequest = ask
|
askRawRequest = ask
|
||||||
invalidParam _pt _pn _pe = error "invalidParam"
|
invalidParam _pt _pn _pe = error "invalidParam"
|
||||||
authRequired = error "authRequired"
|
authRequired = error "authRequired"
|
||||||
instance Exception e => MonadFailure e HandlerIO where
|
instance Exception e => Failure e HandlerIO where
|
||||||
failure = error "HandlerIO failure"
|
failure = error "HandlerIO failure"
|
||||||
|
|
||||||
class ToHandler a where
|
class ToHandler a where
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import Control.Monad.Reader
|
|||||||
import Control.Monad.Attempt
|
import Control.Monad.Attempt
|
||||||
|
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
import Data.Attempt
|
import Control.Monad.Attempt
|
||||||
|
|
||||||
data AuthResource =
|
data AuthResource =
|
||||||
Check
|
Check
|
||||||
|
|||||||
@ -65,7 +65,7 @@ import Test.Framework (testGroup, Test)
|
|||||||
import Data.Generics
|
import Data.Generics
|
||||||
import Control.Exception (Exception)
|
import Control.Exception (Exception)
|
||||||
import Data.Maybe (fromJust)
|
import Data.Maybe (fromJust)
|
||||||
import Data.Convertible
|
import Data.Convertible.Text
|
||||||
|
|
||||||
import Data.Text.Lazy (Text)
|
import Data.Text.Lazy (Text)
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ library
|
|||||||
time >= 1.1.3 && < 1.2,
|
time >= 1.1.3 && < 1.2,
|
||||||
hack >= 2009.5.19,
|
hack >= 2009.5.19,
|
||||||
split >= 0.1.1 && < 0.2,
|
split >= 0.1.1 && < 0.2,
|
||||||
authenticate >= 0.2.1 && < 0.3,
|
authenticate >= 0.4.0 && < 0.5,
|
||||||
data-default >= 0.2 && < 0.3,
|
data-default >= 0.2 && < 0.3,
|
||||||
predicates >= 0.1 && < 0.2,
|
predicates >= 0.1 && < 0.2,
|
||||||
bytestring >= 0.9.1.4 && < 0.10,
|
bytestring >= 0.9.1.4 && < 0.10,
|
||||||
@ -36,10 +36,10 @@ library
|
|||||||
directory >= 1 && < 1.1,
|
directory >= 1 && < 1.1,
|
||||||
transformers >= 0.1.4.0 && < 0.2,
|
transformers >= 0.1.4.0 && < 0.2,
|
||||||
monads-fd >= 0.0.0.1 && < 0.1,
|
monads-fd >= 0.0.0.1 && < 0.1,
|
||||||
attempt >= 0.0.2 && < 0.1,
|
control-monad-attempt >= 0.0.0 && < 0.1,
|
||||||
syb,
|
syb,
|
||||||
text >= 0.5 && < 0.6,
|
text >= 0.5 && < 0.6,
|
||||||
convertible >= 1.2.0 && < 1.3,
|
convertible-text >= 0.0.0 && < 0.1,
|
||||||
clientsession >= 0.0.1 && < 0.1,
|
clientsession >= 0.0.1 && < 0.1,
|
||||||
zlib >= 0.5.2.0 && < 0.6
|
zlib >= 0.5.2.0 && < 0.6
|
||||||
exposed-modules: Web.Restful,
|
exposed-modules: Web.Restful,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user