X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=examples%2FHelloWorld.hs;h=f8a4721dca6c5503a31e50715e69e43d0c0c2273;hb=b22e702f8161447a460847c6e6c97104c150534f;hp=d7e0071c8767f72caf9e9bc72c0ef08e748c3b66;hpb=f402841101b4b84f263eea1a43c848f81c48ff93;p=Lucu.git 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, "]"] }