From f5461eb3d4eb2605b546a4ed202c12bcdaa1f4e4 Mon Sep 17 00:00:00 2001 From: "john.j.camilleri" Date: Mon, 16 Sep 2013 07:17:27 +0000 Subject: Remove contribs and examples Everything has now been moved to a separate repository at https://github.com/GrammaticalFramework/gf-contrib The contents of the examples folder are build during SetupWeb --- examples/fracas/ToHTML.hs | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 examples/fracas/ToHTML.hs (limited to 'examples/fracas/ToHTML.hs') diff --git a/examples/fracas/ToHTML.hs b/examples/fracas/ToHTML.hs deleted file mode 100644 index 4eccfdcfe..000000000 --- a/examples/fracas/ToHTML.hs +++ /dev/null @@ -1,43 +0,0 @@ -import Data.Char(isSpace) - -main = interact (unlines.wrap "dl".concatMap conv.paras.lines) - -conv (('@':n):ls) = (tag_class aname "dt"++(fmtnum n++": "++vt abs++" "++abs)):map conc concs - where - (aname,abs):concs = map (apSnd (dropWhile isSpace.drop 1).break (==':')) ls - conc (lang,s) = tag_class lang "dd"++vp abs lang++" "++s - -vt abs = tag' "img" ("src=\"http://cloud.grammaticalframework.org/minibar/tree-btn.png\""++a) - where - a = " onclick=\"vt(this,'"++abs++"')\"" - -vp abs lang = tag' "img" ("src=\"http://cloud.grammaticalframework.org/minibar/tree-btn.png\""++a) - where - a = " onclick=\"vp(this,'"++lang++"','"++abs++"')\"" - -fmtnum n = - case words (map u2s n) of - [_,n1,n2,_] -> dropWhile (=='0') n1++"."++n2 - _ -> n - where - u2s '_' = ' ' - u2s c = c - --------------------------------------------------------------------------------- - -paras ls = - case dropWhile null ls of - [] -> [] - ls -> case break null ls of - (ls1,ls2) -> ls1:paras ls2 - -wrap t ls = tag t:ls++[endtag t] - -tag_class cls t = tag' t ("class="++cls) - -tag' t a = '<':t++" "++a++">" - -tag t = '<':t++">" -endtag t = tag ('/':t) - -apSnd f (x,y) = (x,f y) -- cgit v1.2.3