X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=examples%2FHelloWorld.hs;h=f8a4721dca6c5503a31e50715e69e43d0c0c2273;hp=d7e0071c8767f72caf9e9bc72c0ef08e748c3b66;hb=8a7649cdf5d96d511dd6e2dfa4e2b741ffac4f9a;hpb=874e6a4cc1229d29f1d902f36482cf0f78e30c9f diff --git a/examples/HelloWorld.hs b/examples/HelloWorld.hs index d7e0071..f8a4721 100644 --- a/examples/HelloWorld.hs +++ b/examples/HelloWorld.hs @@ -1,5 +1,6 @@ {-# LANGUAGE OverloadedStrings + , QuasiQuotes , UnicodeSyntax #-} import Control.Applicative @@ -26,7 +27,7 @@ helloWorld ∷ ResourceDef helloWorld = emptyResource { resGet - = Just $ do setContentType $ parseMIMEType "text/hello" + = Just $ do setContentType [mimeType| text/hello |] putChunk "Hello, " putChunk "World!\n" putChunks =≪ Lazy.pack <$> getRemoteAddr' @@ -34,6 +35,6 @@ helloWorld = Just $ do str1 ← getChunk 3 str2 ← getChunk 3 str3 ← getChunk 3 - setContentType $ parseMIMEType "text/hello" + setContentType [mimeType| text/hello |] putChunks $ Lazy.fromChunks ["[", str1, " - ", str2, "#", str3, "]"] }