Basic upgrade to data-object-yaml 0.2.0

This commit is contained in:
Michael Snoyman 2010-01-21 20:00:22 +02:00
parent a5893f5621
commit 953d66542a
2 changed files with 2 additions and 4 deletions

View File

@ -216,8 +216,6 @@ data RPNode = RPNode RP VerbMap
deriving (Show, Eq)
data VerbMap = AllVerbs String | Verbs [(Verb, String)]
deriving (Show, Eq)
instance ConvertAttempt YamlDoc [RPNode] where
convertAttempt = fromTextObject <=< ca
instance ConvertAttempt TextObject [RPNode] where
convertAttempt = mapM helper <=< fromMapping where
helper :: (Text, TextObject) -> Attempt RPNode
@ -384,7 +382,7 @@ liftVerbMap (Verbs vs) r rp = do
strToExp :: Bool -> String -> Q Exp
strToExp toCheck s = do
rpnodes <- runIO $ convertAttemptWrap $ YamlDoc $ cs s
rpnodes <- runIO $ decode (cs s) >>= \to -> convertAttemptWrap (to :: TextObject)
(if toCheck then rpnodesTHCheck else rpnodesTH) rpnodes
#if TEST

View File

@ -39,7 +39,7 @@ library
bytestring >= 0.9.1.4 && < 0.10,
web-encodings >= 0.2.0 && < 0.3,
data-object >= 0.2.0 && < 0.3,
data-object-yaml >= 0.0.0 && < 0.1,
data-object-yaml >= 0.2.0 && < 0.3,
directory >= 1 && < 1.1,
transformers >= 0.1.4.0 && < 0.2,
control-monad-attempt >= 0.0.0 && < 0.1,