From 717d4deda5ae881602a4b6411289720bea441041 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Fri, 2 Dec 2011 11:36:43 +0200 Subject: [PATCH] Avoid ++ --- Web/Authenticate/Facebook.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Web/Authenticate/Facebook.hs b/Web/Authenticate/Facebook.hs index 188853b6..13b68238 100644 --- a/Web/Authenticate/Facebook.hs +++ b/Web/Authenticate/Facebook.hs @@ -47,15 +47,15 @@ getForwardUrlParams fb params = copyByteString "https://graph.facebook.com/oauth/authorize" `mappend` renderQueryText True - ([ ("client_id", Just $ facebookClientId fb) - , ("redirect_uri", Just $ facebookRedirectUri fb) - ] ++ map (id *** Just) params) + ( ("client_id", Just $ facebookClientId fb) + : ("redirect_uri", Just $ facebookRedirectUri fb) + : map (id *** Just) params) -- Internal function used to simplify getForwardUrl & getForwardUrlWithState getForwardUrlWithExtra_ :: Facebook -> [Text] -> [(Text, Text)] -> Text getForwardUrlWithExtra_ fb perms extra = getForwardUrlParams fb $ (if null perms - then [] - else [("scope", T.intercalate "," perms)]) ++ extra + then id + else (("scope", T.intercalate "," perms):)) extra getForwardUrlWithState :: Facebook -> [Text] -> Text -> Text getForwardUrlWithState fb perms state = getForwardUrlWithExtra_ fb perms [("state", state)]