14
Feb
Happstack Guestbook
Hey congrats! You're using Happstack 0.1.9. This is a guestbook example which you can freely change to your whims and fancies.
Leave a message for the next visitor here...
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -F -pgmFtrhsx #-} module AppView where import AppState import HSP import System.Locale (defaultTimeLocale) import System.Time (formatCalendarTime, toUTCTime) instance (XMLGenerator m) => (EmbedAsChild m (GuestBookEntry, Bool)) where asChild ((GuestBookEntry author message date), alt) = <%
<% str %>
dateStr ct = formatCalendarTime defaultTimeLocale "%a, %B %d, %Y at %H:%M:%S (UTC)" (toUTCTime ct) instance (XMLGenerator m) => (EmbedAsChild m GuestBook) where asChild (GuestBook entries) = <%Hey congrats! You're using Happstack 0.1.9. This is a guestbook example which you can freely change to your whims and fancies.
Leave a message for the next visitor here...