packages feed

rakuten 0.1.0.3 → 0.1.0.4

raw patch · 6 files changed

+24/−24 lines, 6 filesdep ~req

Dependency ranges changed: req

Files

rakuten.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:                rakuten-version:             0.1.0.3+version:             0.1.0.4 synopsis:            The Rakuten API in Haskell description:         See README at <https://github.com/matsubara0507/rakuten#readme> homepage:            https://github.com/matsubara0507/rakuten#readme@@ -50,7 +50,7 @@     , http-client-tls >=0.3.3.1 && <0.4     , http-types >=0.9.1 && <0.11     , lens >=4.15.3 && <5.0-    , req >=0.3.0 && <0.6+    , req >=0.3.0 && <1.1.0     , text >=1.2.2.1 && <1.3     , unordered-containers >=0.2.8 && <0.3   default-language: Haskell2010@@ -75,7 +75,7 @@     , http-client-tls >=0.3.3.1 && <0.4     , http-types >=0.9.1 && <0.11     , lens >=4.15.3 && <5.0-    , req >=0.3.0 && <0.6+    , req >=0.3.0 && <1.1.0     , text >=1.2.2.1 && <1.3     , unordered-containers >=0.2.8 && <0.3     , servant-server >=0.9.1.1 && <0.13
src/Rakuten/Types/Base.hs view
@@ -8,6 +8,6 @@     ) where
 
 import           Data.Extensible
-import           Data.Text             (Text)
+import           Data.Text       (Text)
 
 type ImageUrl = Record '[ "imageUrl"  ':>  Text ]
src/Rakuten/Types/Class.hs view
@@ -1,11 +1,10 @@-{-# LANGUAGE DataKinds            #-}
-{-# LANGUAGE FlexibleContexts     #-}
-{-# LANGUAGE FlexibleInstances    #-}
-{-# LANGUAGE OverloadedStrings    #-}
-{-# LANGUAGE PolyKinds            #-}
-{-# LANGUAGE ScopedTypeVariables  #-}
-{-# LANGUAGE TypeOperators        #-}
-{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE FlexibleContexts      #-}
+{-# LANGUAGE FlexibleInstances     #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings     #-}
+{-# LANGUAGE ScopedTypeVariables   #-}
+{-# LANGUAGE TypeOperators         #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
 
 module Rakuten.Types.Class
     ( ToParam(..)
@@ -32,7 +31,7 @@     \v -> hgenerateFor (Proxy :: Proxy (KeyValue KnownSymbol FromJSON)) $
     \m -> let k = symbolVal (proxyAssocKey m) in
       case HM.lookup (fromString k) v of
-        Just a -> Field . return <$> parseJSON a
+        Just a  -> Field . return <$> parseJSON a
         Nothing -> fail $ "Missing key: " `mappend` k
 
 instance Forall (KeyValue KnownSymbol ToJSON) xs => ToJSON (Record xs) where
@@ -64,14 +63,14 @@   toParam = (=:)
 
 instance ToParam Text where
-  toParam _ "" = mempty
+  toParam _ ""     = mempty
   toParam name txt = name =: txt
 
 instance ToParam Bool where
   toParam name = (=:) name . bool 0 (1 :: Int)
 
 instance ToParam [Text] where
-  toParam _ [] = mempty
+  toParam _ []    = mempty
   toParam name xs = name =: foldl1 (\acc s -> acc <> "," <> s) (fmap show xs)
 
 instance ToParam a => ToParam (Maybe a) where
src/Rakuten/Types/Error.hs view
@@ -1,6 +1,6 @@-{-# LANGUAGE DataKinds         #-}
-{-# LANGUAGE FlexibleContexts  #-}
-{-# LANGUAGE TypeOperators     #-}
+{-# LANGUAGE DataKinds        #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE TypeOperators    #-}
 
 module Rakuten.Types.Error
     ( RakutenError
test/Rakuten/Test/Class.hs view
@@ -1,7 +1,8 @@-{-# LANGUAGE FlexibleContexts     #-}
-{-# LANGUAGE FlexibleInstances    #-}
-{-# LANGUAGE OverloadedStrings    #-}
-{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE FlexibleContexts      #-}
+{-# LANGUAGE FlexibleInstances     #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings     #-}
+{-# LANGUAGE TypeSynonymInstances  #-}
 
 module Rakuten.Test.Class
     ( TestData(..)
test/Rakuten/Test/MockServer.hs view
@@ -10,11 +10,11 @@     , runMockServer
     ) where
 
-import           Rakuten.Test.Class
-import           Rakuten.Types
 import           Control.Concurrent
 import           Control.Exception
 import           Network.Wai.Handler.Warp
+import           Rakuten.Test.Class
+import           Rakuten.Types
 import           Servant
 
 type RakutenHeader a = a