X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FSocketLike.hs;h=998e4490761bfb6324f6d5bb03a47073ec5c25c4;hp=b9668e067d47a281516c9fc1cc0c6835a693a20a;hb=874e6a4;hpb=1d71c58f6cb96da53cfb2af8129d66ba4f7f4a36 diff --git a/Network/HTTP/Lucu/SocketLike.hs b/Network/HTTP/Lucu/SocketLike.hs index b9668e0..998e449 100644 --- a/Network/HTTP/Lucu/SocketLike.hs +++ b/Network/HTTP/Lucu/SocketLike.hs @@ -1,5 +1,6 @@ {-# LANGUAGE - FlexibleContexts + CPP + , FlexibleContexts , FlexibleInstances , TypeFamilies , UnicodeSyntax @@ -11,8 +12,10 @@ module Network.HTTP.Lucu.SocketLike where import qualified Network.Socket as So import Network.HTTP.Lucu.HandleLike +#if defined(HAVE_SSL) import qualified OpenSSL.Session as SSL import Prelude.Unicode +#endif import qualified System.IO as I class (HandleLike (Handle s)) ⇒ SocketLike s where @@ -30,6 +33,7 @@ instance SocketLike So.Socket where socketPort = So.socketPort +#if defined(HAVE_SSL) instance SocketLike (SSL.SSLContext, So.Socket) where type Handle (SSL.SSLContext, So.Socket) = SSL.SSL @@ -40,3 +44,4 @@ instance SocketLike (SSL.SSLContext, So.Socket) where return (ssl, addr) socketPort = So.socketPort ∘ snd +#endif