]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - examples/Implanted.hs
hlint
[Lucu.git] / examples / Implanted.hs
index 68423086a2472ac51fa1d777ecf9ac412fbe2a97..34878a094a3fd1cfc71ac76df1ff62c6b659b1cf 100644 (file)
@@ -1,10 +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 = "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