fb 0.7.4.1 → 0.7.5
raw patch · 6 files changed
+8/−12 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- fb.cabal +2/−2
- src/Facebook/Base.hs +1/−1
- src/Facebook/Graph.hs +1/−1
- src/Facebook/Object/User.hs +2/−2
- src/Facebook/Types.hs +1/−1
- tests/runtests.hs +1/−5
fb.cabal view
@@ -1,5 +1,5 @@ name: fb-version: 0.7.4.1+version: 0.7.5 license: BSD3 license-file: LICENSE author: Felipe Lessa@@ -85,7 +85,7 @@ -- Library dependencies used on the tests. No need to -- specify versions since they'll use the same as above. base, lifted-base, transformers, bytestring,- http-conduit, http-types, text, time, aeson+ http-conduit, text, time, aeson -- Test-only dependencies , HUnit
src/Facebook/Base.hs view
@@ -101,7 +101,7 @@ } -- | An exception coming from the @fb@ package's code. | FbLibraryException { fbeMessage :: Text }- deriving (Eq, Ord, Show, Typeable)+ deriving (Eq, Ord, Show, Read, Typeable) instance A.FromJSON FacebookException where parseJSON (A.Object v) =
src/Facebook/Graph.hs view
@@ -52,7 +52,7 @@ -- | The identification code of an object. newtype Id = Id { idCode :: Ascii }- deriving (Eq, Ord, Show, Typeable)+ deriving (Eq, Ord, Show, Read, Typeable) instance A.FromJSON Id where parseJSON (A.Object v) = Id <$> v A..: "id"
src/Facebook/Object/User.hs view
@@ -40,7 +40,7 @@ , userVerified :: Maybe Bool , userEmail :: Maybe Text }- deriving (Eq, Ord, Show, Typeable)+ deriving (Eq, Ord, Show, Read, Typeable) instance A.FromJSON User where parseJSON (A.Object v) =@@ -58,7 +58,7 @@ -- | An user's gender.-data Gender = Male | Female deriving (Eq, Ord, Show, Enum, Typeable)+data Gender = Male | Female deriving (Eq, Ord, Show, Read, Enum, Typeable) instance A.FromJSON Gender where parseJSON (A.String "male") = return Male
src/Facebook/Types.hs view
@@ -28,7 +28,7 @@ , appId :: Ascii -- ^ Your application ID. , appSecret :: Ascii -- ^ Your application secret key. }- deriving (Eq, Ord, Show, Typeable)+ deriving (Eq, Ord, Show, Read, Typeable) -- | An access token. While you can make some API calls without
tests/runtests.hs view
@@ -7,11 +7,9 @@ import Data.Text (Text) import Data.Time (parseTime) import Data.Word (Word8, Word16, Word32, Word)-import Network.HTTP.Types (Ascii) import System.Environment (getEnv) import System.Exit (exitFailure) import System.IO.Error (isDoesNotExistError)-import Unsafe.Coerce (unsafeCoerce) import qualified Data.Aeson as A import qualified Data.Aeson.Types as A@@ -190,9 +188,7 @@ prop "works for Id" $ \i -> let toId :: Int -> FB.Id- toId = id' . B.pack . show- where id' :: Ascii -> FB.Id- id' = unsafeCoerce+ toId = FB.Id . B.pack . show j = abs i in FB.encodeFbParam (toId j) == FB.encodeFbParam j