^examples/HelloWorld$
^examples/Implanted$
+^examples/ImplantedSmall$
^examples/MiseRafturai\.hs$
+^examples/SmallFile\.hs$
doesMeet :: (Int -> Bool) -> StatusCode -> Bool
-doesMeet p sc = let (# num, _ #) = statusCode sc
- in
- p num
+doesMeet p sc = case statusCode sc of
+ (# num, _ #) -> p num
-- |@'statusCode' sc@ returns an unboxed tuple of numeric and textual
--- /dev/null
+import Network
+import Network.HTTP.Lucu
+import SmallFile
+
+main :: IO ()
+main = let config = defaultConfig { cnfServerPort = PortNumber 9999 }
+ resources = mkResTree [ ([], smallFile) ]
+ in
+ do putStrLn "Access http://localhost:9999/ with your browser."
+ runHttpd config resources
+
\ No newline at end of file
-build: MiseRafturai.hs
- ghc --make HelloWorld -threaded -O3
- ghc --make Implanted -threaded -O3
+build: MiseRafturai.hs SmallFile.hs
+ ghc --make HelloWorld -threaded -O3 -fwarn-unused-imports
+ ghc --make Implanted -threaded -O3 -fwarn-unused-imports
+ ghc --make ImplantedSmall -threaded -O3 -fwarn-unused-imports
run: build
./HelloWorld
clean:
- rm -f HelloWorld Implanted MiseRafturai.hs *.hi *.o
+ rm -f HelloWorld Implanted MiseRafturai.hs ImplantedSmall SmallFile.hs *.hi *.o
MiseRafturai.hs: mise-rafturai.html
lucu-implant-file -m MiseRafturai -o $@ $<
-.PHONY: build run clean
\ No newline at end of file
+SmallFile.hs: small-file.txt
+ lucu-implant-file -m SmallFile -o $@ $<
+
+.PHONY: build run clean