From 9d51cf2184cc2d1d9703e63cf46b5499b02460dc Mon Sep 17 00:00:00 2001 From: Boyd Stephen Smith Jr Date: Sat, 23 Nov 2013 14:11:40 -0600 Subject: [PATCH] Rename fields to prevent name clashes. --- Cryptsy/API/Public.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cryptsy/API/Public.hs b/Cryptsy/API/Public.hs index f42a95a..ea4cac4 100644 --- a/Cryptsy/API/Public.hs +++ b/Cryptsy/API/Public.hs @@ -50,12 +50,12 @@ import Control.Monad.Trans (lift) import qualified Data.HashMap.Strict as HM (lookup) -- |error conditions w/ debugging information for an API request -data CryptsyError = BadUrl { url :: String } - | BadResponse { response :: Response L.ByteString } - | FailParseResponse { body :: L.ByteString, message :: String } - | ErrorResponse { error :: Value } +data CryptsyError = BadURL { badURL :: String } + | BadResponse { badResponse :: Response L.ByteString } + | FailParseResponse { responseBody :: L.ByteString, errorMessage :: String } + | ErrorResponse { errorValue :: Value } | UnsuccessfulResponse { jsonResponse :: Value } - | FailParseReturn { value :: Value, message :: String } + | FailParseReturn { dataValue :: Value, errorMessage :: String } deriving Show -- |request monad @@ -78,7 +78,7 @@ errMsgKey = pack "error" pubCryptsy :: String -- ^ URL -> PubCryptsy Value pubCryptsy apiurl = do - uri <- maybe (left $ BadUrl apiurl) right $ parseAbsoluteURI apiurl + uri <- maybe (left $ BadURL apiurl) right $ parseAbsoluteURI apiurl let req = defaultGETRequest_ uri (_, resp) <- lift $ request req bodyBytes <- case rspCode resp of -- 2.11.4.GIT