1. Luke Plant
  2. haskellblog

Commits

Luke Plant  committed 3ccb1e8

Initiall 'Hello blogosphere' and build script

  • Participants
  • Parent commits 9c01d76
  • Branches default

Comments (0)

Files changed (2)

File blog.hs

View file
  • Ignore whitespace
+-- "Hello, world" in CGI
+
+import Network.CGI
+import Text.XHtml
+
+page :: Html
+page = body << h1 << "Hello, blogosphere!"
+
+cgiMain :: CGI CGIResult
+cgiMain = output $ renderHtml page
+
+
+main :: IO ()
+main = runCGI $ handleErrors cgiMain

File build

View file
  • Ignore whitespace
+#!/bin/sh
+ghc -package cgi -package xhtml -fallow-overlapping-instances --make -o blog.cgi blog.hs || exit 1
+chmod ugo+rwx blog.cgi
+mv blog.cgi /home/luke/httpd/lukeplant.me.uk/web/cgi-bin/blog.cgi