Merge pull request #598 from haskell-servant/jkarni/issecure
Add instances for IsSecure
This commit is contained in:
commit
7f208c7f7d
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
next
|
||||||
|
----
|
||||||
|
* Added Eq, Show, Read, Generic and Ord instances to IsSecure
|
||||||
|
|
||||||
0.8.1
|
0.8.1
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{-# LANGUAGE DeriveDataTypeable #-}
|
{-# LANGUAGE DeriveDataTypeable #-}
|
||||||
|
{-# LANGUAGE DeriveGeneric #-}
|
||||||
module Servant.API.IsSecure
|
module Servant.API.IsSecure
|
||||||
( -- $issecure
|
( -- $issecure
|
||||||
IsSecure(..)
|
IsSecure(..)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.Typeable
|
import Data.Typeable
|
||||||
|
import GHC.Generics (Generic)
|
||||||
|
|
||||||
-- | Was this request made over an SSL connection?
|
-- | Was this request made over an SSL connection?
|
||||||
--
|
--
|
||||||
|
@ -19,7 +21,7 @@ data IsSecure = Secure -- ^ the connection to the server
|
||||||
-- is secure (HTTPS)
|
-- is secure (HTTPS)
|
||||||
| NotSecure -- ^ the connection to the server
|
| NotSecure -- ^ the connection to the server
|
||||||
-- is not secure (HTTP)
|
-- is not secure (HTTP)
|
||||||
deriving Typeable
|
deriving (Eq, Show, Read, Generic, Ord, Typeable)
|
||||||
|
|
||||||
-- $issecure
|
-- $issecure
|
||||||
--
|
--
|
||||||
|
|
Loading…
Reference in a new issue