]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - examples/SSL.hs
docs
[Lucu.git] / examples / SSL.hs
index 624ed042647729a3003849c4106d7ef293fc63b1..aa8b3a596ffa29031eb136d5b7587976c4ac3f0e 100644 (file)
@@ -42,17 +42,16 @@ main = withOpenSSL $
 
 helloWorld ∷ Resource
 helloWorld 
-    = C.fromList
-      [ ( GET
-        , do setContentType [mimeType| text/plain |]
-             putChunk "getRemoteCertificate = "
-             cert ← do cert ← getRemoteCertificate
-                       case cert of
-                         Just c  → liftIO $ Lazy.pack <$> printX509 c
-                         Nothing → return "Nothing"
-             putChunks cert
-        )
-      ]
+    = C.singleton
+      ( GET
+      , do setContentType [mimeType| text/plain |]
+           putChunk "getRemoteCertificate = "
+           cert ← do cert ← getRemoteCertificate
+                     case cert of
+                       Just c  → liftIO $ Lazy.pack <$> printX509 c
+                       Nothing → return "Nothing"
+           putChunks cert
+      )
 
 genCert ∷ KeyPair k ⇒ k → IO X509
 genCert pkey