yesod-auth: use blaze-html 0.5

This commit is contained in:
Michael Snoyman 2012-04-23 14:14:23 +03:00
parent aa459bc8d8
commit 8802472344
3 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,6 @@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
-- | Use an email address as an identifier via Google's OpenID login system.
--
-- This backend will not use the OpenID identifier at all. It only uses OpenID
@ -20,7 +21,11 @@ import qualified Web.Authenticate.OpenId as OpenId
import Yesod.Handler
import Yesod.Widget (whamlet)
import Yesod.Request
#if MIN_VERSION_blaze_html(0, 5, 0)
import Text.Blaze.Html (toHtml)
#else
import Text.Blaze (toHtml)
#endif
import Data.Text (Text)
import qualified Yesod.Auth.Message as Msg
import qualified Data.Text as T

View File

@ -1,5 +1,6 @@
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
module Yesod.Auth.OpenId
( authOpenId
, authOpenIdExtended
@ -16,7 +17,11 @@ import Yesod.Handler
import Yesod.Widget (toWidget, whamlet)
import Yesod.Request
import Text.Cassius (cassius)
#if MIN_VERSION_blaze_html(0, 5, 0)
import Text.Blaze.Html (toHtml)
#else
import Text.Blaze (toHtml)
#endif
import Data.Text (Text, isPrefixOf)
import qualified Yesod.Auth.Message as Msg
import Control.Exception.Lifted (SomeException, try)

View File

@ -14,6 +14,10 @@ description: Authentication for Yesod.
flag ghc7
flag blaze_html_0_5
description: use blaze-html 0.5 and blaze-markup 0.5
default: False
library
build-depends: base >= 4 && < 5
, authenticate >= 1.2.1 && < 1.3
@ -25,7 +29,6 @@ library
, random >= 1.0.0.2 && < 1.1
, text >= 0.7 && < 0.12
, mime-mail >= 0.3 && < 0.5
, blaze-html >= 0.4.1.3 && < 0.5
, yesod-persistent >= 1.0 && < 1.1
, hamlet >= 1.0 && < 1.1
, shakespeare-css >= 1.0 && < 1.1
@ -42,6 +45,14 @@ library
, pwstore-fast >= 2.2 && < 3
, lifted-base >= 0.1 && < 0.2
if flag(blaze_html_0_5)
build-depends:
blaze-html >= 0.5 && < 0.6
, blaze-markup >= 0.5.1 && < 0.6
else
build-depends:
blaze-html >= 0.4 && < 0.5
exposed-modules: Yesod.Auth
Yesod.Auth.BrowserId
Yesod.Auth.Dummy