From: Michael Andreen Date: Thu, 9 Dec 2004 11:26:36 +0000 (+0000) Subject: adding the main file and some minor changes X-Git-Url: https://ruin.nu/git/?p=yawbih.git;a=commitdiff_plain;h=38f06e9262e9b2dd14906492539006602225d49e adding the main file and some minor changes --- diff --git a/Main.hs b/Main.hs new file mode 100644 index 0000000..93a5616 --- /dev/null +++ b/Main.hs @@ -0,0 +1,21 @@ +module Main where + +import CGI hiding (div, head, map, span) +import RawCGIInternal +import CGIOutput + +main = start [] cgi + +cgi CGIInfo {cgiUrl = url, cgiPathInfo = pi, cgiContentType = ct, cgiContents = c, cgiCookies = co, cgiArgs = as, cgiHandle = h} parms = do + putStr "content-type: text/html\n\n" + print parms + print url + print pi + print ct + print co + print co + print as + print h + case assocParm "test" parms of + Nothing -> putStr "Parameter 'test' not provided" + Just x -> putStr $ "Value of test = "++x diff --git a/Wiki.hs b/Wiki.hs index bcfd236..1708f57 100644 --- a/Wiki.hs +++ b/Wiki.hs @@ -11,7 +11,7 @@ class Backend a where --Keyword -> (Full text,date) getCurrent :: a -> String -> IO (Maybe (String,String)) - --Keyword -> [(id,date)] + --Keyword -> [(id,date,author,comment)] getList :: a -> String -> IO [(String, String, String, String)] --Keyword -> id -> Full text @@ -23,6 +23,12 @@ class Backend a where --Keyword -> Full text -> id update :: a -> String -> String -> String -> String -> IO String +data Markup = Text String + | Bold String + | Paragraph [Markup] + +type Document = [Markup] + newtype PGB = PGB DBService createPGB :: String -> String -> String -> String -> IO PGB