-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | An overly complex Haskell web framework.
--
@package skell
@version 0.0.1.1
module Web.Skell.Responsible
-- | Things that generate a response
class Responsible a
respond :: Responsible a => a -> Request -> Response
-- | Things that generate a response, but need IO to do so
class Irresponsible a
respondIO :: Irresponsible a => a -> Request -> IO Response
-- | Given a content type, such as "text/html", and a
-- Bytestring response, send a response with status 200.
respond200 :: ByteString -> ByteString -> Response
-- | Given a content type, such as "text/html", and a
-- Bytestring response, send a response with status 403.
respond403 :: ByteString -> ByteString -> Response
-- | Given a content type, such as "text/html", and a
-- Bytestring response, send a response with status 404.
respond404 :: ByteString -> ByteString -> Response
-- | Given a content type, such as "text/html", and a
-- Bytestring response, send a response with status 405.
respond405 :: ByteString -> ByteString -> Response
module Web.Skell.MimeTypes
type MimeType = ByteString
css :: MimeType
eot :: MimeType
html :: MimeType
js :: MimeType
otf :: MimeType
plain :: MimeType
svg :: MimeType
ttf :: MimeType
woff :: MimeType
module Paths_skell
version :: Version
getBinDir :: IO FilePath
getLibDir :: IO FilePath
getDataDir :: IO FilePath
getLibexecDir :: IO FilePath
getDataFileName :: FilePath -> IO FilePath
getSysconfDir :: IO FilePath
module Web.Skell.Saferoute
-- | The type for a route - just an alias for Text
type Route = Text
-- | The type class for a resource.
class Eq r => Resource r where resourceList = elems routeResourceMap routeResourceMap = fromList [(route, resource) | resource <- resourceList, let route = getRoute resource] lookupRoute route = lookup route routeResourceMap getUrl = toValue . getRoute
getRoute :: Resource r => r -> Route
resourceList :: Resource r => [r]
routeResourceMap :: Resource r => Map Route r
lookupRoute :: Resource r => Route -> Maybe r
getUrl :: (Resource r, Resource r) => r -> AttributeValue
-- | Intercalate slashes, and add one to the front
slashPrependJoin :: [Text] -> Text
module Web.Skell.Resources
-- | The things that have a URL
data SkellRes
BootstrapCss :: SkellRes
BootstrapJs :: SkellRes
GlyphiconsEot :: SkellRes
GlyphiconsSvg :: SkellRes
GlyphiconsTtf :: SkellRes
GlyphiconsWoff :: SkellRes
JQueryJs :: SkellRes
df200 :: MimeType -> FilePath -> IO Response
-- | Error pages,
data ErrorPage
Status403 :: ErrorPage
Status404 :: ErrorPage
Status405 :: ErrorPage
instance Eq SkellRes
instance Show SkellRes
instance Irresponsible SkellRes
instance Resource SkellRes
module Web.Skell.Partials
defaultWrapper :: Html -> Html -> Html
stylesheetTag :: Resource r => r -> Html
-- | Tag for any link
linkTag :: AttributeValue -> Html -> Html
-- | Email tag for any email
emailTag :: Text -> Html