Permalink
Browse files

Clarify heistServe documentation

  • Loading branch information...
1 parent ecc0dc2 commit 34870eda0290902136c54c9811774a5e10426161 @mightybyte mightybyte committed Nov 1, 2012
Showing with 10 additions and 8 deletions.
  1. +10 −8 src/Snap/Snaplet/Heist.hs
View
@@ -200,19 +200,21 @@ cRenderAs ct t = withTop' heistLens (Unclassed.cRenderAs ct t)
------------------------------------------------------------------------------
--- | Analogous to 'fileServe'. If the template specified in the request path
--- is not found, it returns 'empty'. Also, this function does not serve any
--- templates beginning with an underscore. This gives you a way to prevent
--- some templates from being served. For example, you might have a template
--- that contains only the navbar of your pages, and you wouldn't want that
--- template to be visible to the user as a standalone template.
+-- | A handler that serves all the templates (similar to 'fileServe'). If the
+-- template specified in the request path is not found, it returns 'empty'.
+-- Also, this function does not serve any templates beginning with an
+-- underscore. This gives you a way to prevent some templates from being
+-- served. For example, you might have a template that contains only the
+-- navbar of your pages, and you probably wouldn't want that template to be
+-- visible to the user as a standalone template. So if you put it in a file
+-- called \"_nav.tpl\", this function won't serve it.
heistServe :: HasHeist b => Handler b v ()
heistServe = withTop' heistLens Unclassed.heistServe
------------------------------------------------------------------------------
--- | Analogous to 'fileServeSingle'. If the given template is not found,
--- this throws an error.
+-- | Handler for serving a single template (similar to 'fileServeSingle'). If
+-- the given template is not found, this throws an error.
heistServeSingle :: HasHeist b
=> ByteString
-- ^ Template name

0 comments on commit 34870ed

Please sign in to comment.