scotty-resource 0.1.1.0 → 0.2.0.0
raw patch · 2 files changed
+9/−9 lines, 2 filesdep ~basedep ~transformers
Dependency ranges changed: base, transformers
Files
scotty-resource.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: scotty-resource-version: 0.1.1.0+version: 0.2.0.0 synopsis: A Better way of modeling web resources. description: Allows users of the Scotty web framework to model@@ -25,12 +25,12 @@ other-extensions: OverloadedStrings build-depends:- base >= 4.7 && < 4.9,+ base >= 4.8 && < 4.10, containers >= 0.1.0.0 && < 0.6, http-types >= 0.8.2 && < 0.10, scotty >= 0.10 && < 0.12, text >= 0.11.3.1 && < 1.3,- transformers >= 0.3.0.0 && < 0.5,+ transformers >= 0.3.0.0 && < 0.6, wai >= 3.0.0 && < 3.3 hs-source-dirs: src default-language: Haskell2010
src/Web/Scotty/Resource/Trans.hs view
@@ -118,11 +118,11 @@ import Prelude hiding (head) -import Control.Monad (liftM)+import Control.Monad (liftM, ap) import Control.Monad.IO.Class (MonadIO) import Data.List (intersperse) import Data.Maybe (fromMaybe)-import Data.Monoid (mconcat, (<>), mempty, Monoid, mappend)+import Data.Monoid ((<>)) import Data.Set (fromList, toList) import Data.Text.Encoding (decodeUtf8) import Data.Text.Lazy (fromStrict)@@ -166,10 +166,10 @@ -} data WebResource e m a = W [(Method, ActionT e m ())] a instance Functor (WebResource e m) where- fmap f (W m a) = W m (f a)+ fmap = liftM instance Applicative (WebResource e m) where- pure = W []- W l f <*> W r a = W (l <> r) (f a)+ pure = return+ (<*>) = ap instance Monad (WebResource e m) where return = W [] W methods a >>= f =@@ -247,7 +247,7 @@ {- | A helper function that removes duplicates from a list. -}-dedupe :: (Ord a, Eq a) => [a] -> [a]+dedupe :: (Ord a) => [a] -> [a] dedupe = toList . fromList