Possibilities for website construction using Haskell?

What are the possibilities for website construction using Haskell?

On Sun, 2008-01-13 at 20:59 +0100, Hugh Perkins wrote:
What are the possibilities for website construction using Haskell?
http://hackage.haskell.org/packages/archive/pkg-list.html http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programmin... I'm sure you can figure it out from here, or at least come back with a more specific question.

On Jan 13, 2008 8:13 PM, Derek Elkins
http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programmin...
Good link. Lots of options apparently :-)
I'm sure you can figure it out from here, or at least come back with a more specific question.
Which ones are most widely used? HWS and Wash Server Pages sounds interesting? ... as does Haskell Server Pages ... and HASP... and .... Are there any popular websites using any of these technologies? Which technologies are most powerful? Which ones are easiest to use? Which ones are most stable?

hughperkins:
On Jan 13, 2008 8:13 PM, Derek Elkins
wrote: http://www.haskell.org/haskellwiki/Applications_and_libraries/Web_programmin...
Good link. Lots of options apparently :-)
I'm sure you can figure it out from here, or at least come back with a more specific question.
Which ones are most widely used? HWS and Wash Server Pages sounds interesting?
... as does Haskell Server Pages ... and HASP... and ....
Are there any popular websites using any of these technologies? Which technologies are most powerful? Which ones are easiest to use? Which ones are most stable?
The main tools I've seen real projects done in are: * HAppS (see hpaste.org) * fastcgi + xhtml + maybe some JSON (used for lots of things) * cgi + xhtml * WASH (see braintreehemp.com.au) So it depends on what you're comfortable with. -- Don

Hi
Which ones are most widely used? HWS and Wash Server Pages sounds interesting?
Hoogle (http://haskell.org/hoogle) uses Haskell Source Extensions (http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/) My academic website (http://www-users.cs.york.ac.uk/~ndm/) uses some custom code (http://www-users.cs.york.ac.uk/~ndm/Main.hs) Thanks Neil

ndmitchell:
Hi
Which ones are most widely used? HWS and Wash Server Pages sounds interesting?
Hoogle (http://haskell.org/hoogle) uses Haskell Source Extensions (http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/)
I thought haskell-src-exts was an extended Language.Haskell parser? Do you mean HSP -- haskell server pages?
My academic website (http://www-users.cs.york.ac.uk/~ndm/) uses some custom code (http://www-users.cs.york.ac.uk/~ndm/Main.hs)
So that's CGI, or offline page generation? -- Don

Hi
Hoogle (http://haskell.org/hoogle) uses Haskell Source Extensions (http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/)
I thought haskell-src-exts was an extended Language.Haskell parser? Do you mean HSP -- haskell server pages?
No, I mean haskell-src-exts. It's a translator from Haskell with embedded XML to pure Haskell.
My academic website (http://www-users.cs.york.ac.uk/~ndm/) uses some custom code (http://www-users.cs.york.ac.uk/~ndm/Main.hs)
So that's CGI, or offline page generation?
Offline page generation. Thanks Neil

ndmitchell:
Hi
Hoogle (http://haskell.org/hoogle) uses Haskell Source Extensions (http://www.cs.chalmers.se/~d00nibro/haskell-src-exts/)
I thought haskell-src-exts was an extended Language.Haskell parser? Do you mean HSP -- haskell server pages?
No, I mean haskell-src-exts. It's a translator from Haskell with embedded XML to pure Haskell.
My academic website (http://www-users.cs.york.ac.uk/~ndm/) uses some custom code (http://www-users.cs.york.ac.uk/~ndm/Main.hs)
So that's CGI, or offline page generation?
Offline page generation.
Hugh asked on #haskell about how to do offline / cgi with xhtml combinators, I threw together a little example (since it seems this isn't widely known): import Text.XHtml.Transitional import System.Environment import System.Time main = do time <- getClockTime putStrLn . prettyHtml $ (header (thetitle (toHtml "testing"))) +++ (body $ (center $ h2 (toHtml (hotlink "http://haskell.org" (toHtml "Haskell is fun")))) +++ toHtml (show time)) Generates this page, http://galois.com/~dons/tmp/test.html Note that using string overloading we can remove some of the toHtml's... {-# LANGUAGE OverloadedStrings #-} instance IsString Html where fromString = toHtml main = do time <- getClockTime putStrLn . prettyHtml $ (header (thetitle "testing")) +++ (body $ center $ h2 (toHtml (hotlink "http://haskell.org" "Haskell is fun"))) +++ show time Cheers, Don

Don Stewart wrote:
Note that using string overloading we can remove some of the toHtml's...
{-# LANGUAGE OverloadedStrings #-}
instance IsString Html where fromString = toHtml
main = do time <- getClockTime
putStrLn . prettyHtml $ (header (thetitle "testing")) +++ (body $ center $ h2 (toHtml (hotlink "http://haskell.org" "Haskell is fun"))) +++ show time
You can also eliminate the toHtmls by using the "<<" operator defined by XHTML. It has type (HTML a) => (Html -> b) -> a -> b, where HTML is a type class which has strings, among other things, already defined as instances. So the above can be written as follows, without an additional string overloading: main = do time <- getClockTime putStrLn . prettyHtml $ (header (thetitle << "testing")) +++ (body $ (center $ h2 << (hotlink "http://haskell.org" << "Haskell is fun")) +++ p << show time) (Wrapping the time in an HTML element like a paragraph allows the use of << to "fill" the paragraph.) Anton
participants (5)
-
Anton van Straaten
-
Derek Elkins
-
Don Stewart
-
Hugh Perkins
-
Neil Mitchell