From e60354ebe1609d8e09e6874f7bf7556ef05a2d2c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 25 Oct 2009 22:58:20 +0200 Subject: [PATCH] data -> newtype for Identifier --- Web/Authenticate/OpenId.hs | 6 +++--- authenticate.cabal | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Web/Authenticate/OpenId.hs b/Web/Authenticate/OpenId.hs index a99acc2f..d2e87e3d 100644 --- a/Web/Authenticate/OpenId.hs +++ b/Web/Authenticate/OpenId.hs @@ -23,14 +23,14 @@ import Network.HTTP.Wget import Text.HTML.TagSoup import Numeric (showHex) import Control.Monad.Trans -import Control.Monad.Attempt.Class import qualified Data.Attempt.Helper as A import Data.Generics import Data.Attempt import Control.Exception -- | An openid identifier (ie, a URL). -data Identifier = Identifier { identifier :: String } +newtype Identifier = Identifier { identifier :: String } + deriving (Eq, Show) data Error v = Error String | Ok v instance Monad Error where @@ -77,7 +77,7 @@ constructUrl url args = url ++ "?" ++ queryString args -- | Handle a redirect from an OpenID provider and check that the user -- logged in properly. If it was successfully, 'return's the openid. --- Otherwise, 'fail's an explanation. +-- Otherwise, 'failure's an explanation. authenticate :: (MonadIO m, MonadAttempt m) => [(String, String)] -> m Identifier diff --git a/authenticate.cabal b/authenticate.cabal index dfffc280..b50a2c8c 100644 --- a/authenticate.cabal +++ b/authenticate.cabal @@ -8,7 +8,7 @@ synopsis: Authentication methods for Haskell web applications. description: Focus is on remote authentication methods, such as OpenID, rpxnow and Google. category: Web -stability: unstable +stability: Stable cabal-version: >= 1.2 build-type: Simple homepage: http://github.com/snoyberg/authenticate/tree/master