^.installed-pkg-config$
^examples/HelloWorld$
+^examples/Implanted$
+^examples/MiseRafturai\.hs$
, staticDir "/usr/include" )
]
in
- runHttpd config resources
+ do putStrLn "Access http://localhost:9999/ with your browser."
+ runHttpd config resources
helloWorld :: ResourceDef
--- /dev/null
+import MiseRafturai
+import Network
+import Network.HTTP.Lucu
+
+main :: IO ()
+main = let config = defaultConfig { cnfServerPort = PortNumber 9999 }
+ resources = mkResTree [ ([], miseRafturai) ]
+ in
+ do putStrLn "Access http://localhost:9999/ with your browser."
+ runHttpd config resources
+
\ No newline at end of file
-build:
- ghc --make HelloWorld -threaded -fglasgow-exts -O3
+build: MiseRafturai.hs
+ ghc --make HelloWorld -threaded -O3
+ ghc --make Implanted -threaded -O3
run: build
./HelloWorld
clean:
- rm -f HelloWorld *.hi *.o
+ rm -f HelloWorld Implanted MiseRafturai.hs *.hi *.o
+
+MiseRafturai.hs: mise-rafturai.html
+ lucu-implant-file -m MiseRafturai -o $@ $<
.PHONY: build run clean
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<html xml:lang="ga" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Mise Rafturaí</title>
+ </head>
+ <body>
+ <h1>Mise Rafturaí</h1>
+
+ <p>
+ Mise Rafturaí an file<br />
+ Lán dúċais is gráḋ<br />
+ Le súile gan solas<br />
+ Le ciúnas gan crá<br />
+ </p>
+
+ <p>
+ Ag dul síar ar m'aistear<br />
+ Le solas mo ċroí<br />
+ Fann agus tuirseaċ<br />
+ Go deireaḋ mo ṡlí<br />
+ </p>
+
+ <p>
+ Féaċ anois mé<br />
+ Is mo ċúl le ḃfalla<br />
+ Ag seinm ceoil<br />
+ Do ṗócaí folaṁ<br />
+ </p>
+ </body>
+</html>
\ No newline at end of file