data -> newtype for Identifier

This commit is contained in:
Michael Snoyman 2009-10-25 22:58:20 +02:00
parent 9fe332dc33
commit e60354ebe1
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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