]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - examples/Implanted.hs
hlint
[Lucu.git] / examples / Implanted.hs
index 633e40ae4f1361cfebf4ee344a760045742ab15e..34878a094a3fd1cfc71ac76df1ff62c6b659b1cf 100644 (file)
@@ -1,11 +1,16 @@
+{-# LANGUAGE
+    UnicodeSyntax
+  #-}
+import qualified Data.Collections as C
 import MiseRafturai
 import Network
 import Network.HTTP.Lucu
+import Prelude.Unicode
 
-main :: IO ()
-main = let config    = defaultConfig { cnfServerPort = PortNumber 9999 }
-           resources = mkResTree [ ([], miseRafturai) ]
+main ∷ IO ()
+main = let config = defaultConfig { cnfServerPort = "9999" }
+           tree   ∷ ResourceTree
+           tree   = C.fromList [ ([], nonGreedy miseRafturai) ]
        in
          do putStrLn "Access http://localhost:9999/ with your browser."
-            runHttpd config resources
-                                   
\ No newline at end of file
+            withSocketsDo ∘ runHttpd config $ resourceMap tree