úÎoWk€@      !"#$%&'()*+,-./0123456789:;<= > ? ESort of like a foreign key constraint, if macid were a normal rdbms. …Eg, say you have a table called RepoUsers. When a user (or repo) is deleted , all the RepoUsers that match it should also be deleted   fullUrlLink "http:www.google.com" j | for when you want a link that the anchor text is the full url. eg, for displaying a url for darcs get.  simpleLink ("http:www.google.com",",google is a nice way to look for information") 3like simpleLink, but a link tag is class=attention ‹if class attention is defined via css you can get some useful behavior. I typically do something like the following, in a global css file: !a.attention:link {color: orange} #a.attention:active {color: orange} $a.attention:visited {color: orange} "a.attention:hover {color: orange} ,width and height args blank blank if you don't want to specify this 1simpleImage (url, alttext) (width, height) = ... Eformat a list of text vertically by putting list items in paragraphs 6paintTable mbHeaderCells datacells mbPagination = ... \mbHeaderCells: text for header cells, if you want them. Can use html formatting if desired. pagination also optional optional header rows  table cells optional pagination  paintTable'= tableF trF spacerRow mbHeaderStuff datacells mbPagination = ,helper function for a table with pagination 6see paintTable for an example of how this can be used table tag function /row tag function, input is table cell contents (spacer row, more padding)  (use ("",False) for no spacer rows) 7 if more padding is true, prepend and append spacers 0optional (header rows, header row tag function)  table cells optional pagination substitute newlines with  br 1The checkbox form element has optional attribute checked. JIf this attribute is present, readcheckbox returns true, otherwise false. žuse in conjunction with checkStringIfTrue, when, eg, writing StringTemplate code that renders a from with a box that might or not be checked. Something like: attrs = [ ... , (somethingIsChecked*, checkedStringIfTrue $ someBoolVal ) ... ] =useful hack for dealing with checkboxes in HAppS. Maybe there's a better way? "checkedStringIfTrue p = if p then "checked" else "" /Render a list of strings as an unordered list ( ul... /ul) -Render a list of strings as an ordered list ( ol... /ol) 4render a list of strings horizontally, separated by " | "  @A    ORender a link which changes color when the current page is active, modulo css. menuLink rq (url,anchortext) žsimilar to simpleLink, outputs an html link. However, menuLink looks at the request to determine if the page being linked to is the current page. If it is, it'Ms in class menuitemSelected, otherwise class menuitem. if the url is blank, Gthe link is unclickable, just displayed gray (e.g., features that haven'®t been enabled but are coming soon). You need to define the classes described here via css for these features to be useful. I usually do something like in a global css file: a.menuitem:link {color: blue}  a.menuitem:active {color: blue} !a.menuitem:visited {color: blue} a.menuitem:hover {color: blue} (a.menuitemSelected:link {color: purple} *a.menuitemSelected:active {color: purple} +a.menuitemSelected:visited {color: purple} )a.menuitemSelected:hover {color: purple} menuLink': classSelected classUnselected rq (url,anchortext) = ...  /hMenuBars rq = paintHBars . map (menuLink rq)    !"#$ multiple vhosts to a server, eg  | vhosts [( mysite.com,80),(www.mysite.com,80)] mySiteController vhost doms h = msum . map (d -> site d h) doms c similar to apache vhost. given (domain,port) and a main request handler, handle requests if it'!s the specified domain and port  vhost ( mysite.com,80) mySiteController BCD!"#E$!"#$!"#$%&'()*+,-./01<check if the submitted password matches the stored password stored salt and password hash password to test (unhashed)  did it match 2(hash a password using the supplied salt AOriginally implemented using SHA1. By switching to pbkdf2, we don'Et rely on implementation of randomIO being cryptographically secure. 3+changepass oldpassTryString newpassString p@(Password salt hash) = ... K Change password, requires old password as an additional security measure 4generate some random salt  returns 4 F of salt. 5generate a new salted/hashed *) from the given input string %&'()*+,-./01GH2345%&'()*0/.-,+12345%&&'(()**+,-./0123456 1 case modRewriteAppUrl "tutorial/registered" of  Left e -> ...  Right page -> ... %Given a page path, try to return the  home page? of a happs server, basically, the host plus an optional path. SAt the same time, try to deal sanely with HAppS serving behind apache mod rewrite, #a common situation for me at least Rbecause it lets you have multiple happs servers listening on different ports, all clooking to the casual user like they are being served on port 80, and also unblocked by firewalls. Can fail monadically 7getHost = getHeaderVal "host" Breturns host with port numbers, if anything other than default 80 8Kretrieve val of header for key supplied, or an error message if the key isn't found 9-host with port number stripped out, if any. ?Useful, for example, for getting the right address to ssh to. 678967896789:redirectPath def path rq = ... eg, redirectPath (fail  horribly) pathtopage" will redirect to http: myserver.compathtopage  or http:localhost:5001pathto/=page depending on whether it is servin in online environemnt ( or for local development on port 5001 , Could produce an error if the hostname can'5t be determined for some reason (malformed headers?) ;6Escape a serverPartT handler by redirecting somewhere BBasically a wrapper around supplied seeOther function, which doesn't quite do what I want :;:;:;# @A << IJ=browsedir = browsedir' defPaintdir defPaintfile /define a ServerPartT value with something like sp = browsedir " projectroot" "." <where projectroot is an alias (what you see in the url) and .1 is the path relative to the executable running the happs server >@like browsedir, but haskell files are rendered through hscolour browsedirHS = browsedir' defPaintdir hsPaintfile ? browsedir'% paintdir paintfile diralias syspath paintdir/"paintfile are rendering functions +diralias: path that will appear in browser syspath: real system path =>?=>?=>? G @A BCD!"#E$%&'()*+,-./01GH23456789:;<=>?K      !"#$%&'()*+,--..//0123456789:;<=>?@A B C DEFGHIJKLMNO P PQhappstack-helpers-0.52Happstack.Data.IxSet.Helpers#Happstack.Helpers.HtmlOutput.Common!Happstack.Helpers.HtmlOutput.MenuHappstack.Server.HelpersHappstack.Data.User.PasswordHappstack.Helpers.ParseRequestHappstack.Helpers.RedirectHappstack.Helpers.HtmlOutputHappstack.Helpers.DirBrowseHappstack.Helpers deleteWhereHtmlText HtmlString Pagination currentbar resultsPerBar currentpageresultsPerPagebaselinkpaginationtitle fullUrlLink simpleLinksimpleAttentionLink simpleImage paintVHtml paintTable paintTable'paintPaginationBargetPaginatedCellsnewlinesToHtmlLines readcheckboxcheckedStringIfTruepaintVULpaintVOL paintHBarsmenuLink menuLink'vMenuOLvMenuUL hMenuBarsexactdirspsIfgetData'vhostSalt PasswordHashPassword constr[ahuP]dataType[ahuO] constr[ahv0]dataType[ahuZ] constr[ahva]dataType[ahv9] checkPassworddoHash changepassgenSalt newPasswordmodRewriteAppUrlgetHost getHeaderVal getDomain redirectPath redirectToUrldirectoryGroupsHAppS browsedir browsedirHS browsedir' biggerfont splitList smartservertime stateShutdownvhostsghc-prim GHC.TypesCharmkPtBrowseHtmlString