-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | An overly complex Haskell web framework.
--
@package skell
@version 0.1.0.0
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 Web.Skell.Saferoute
-- | The type for a route - just an alias for Text
type Route = Text
type RoutePart = Text
type RouteParts = [Text]
type ForeignResource = AttributeValue
-- | 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 lookupRouteParts = lookupRoute . slashPrependJoin getUrl = toValue . getRoute
getRoute :: Resource r => r -> Route
resourceList :: Resource r => [r]
routeResourceMap :: Resource r => Map Route r
lookupRoute :: Resource r => Route -> Maybe r
lookupRouteParts :: Resource r => RouteParts -> Maybe r
getUrl :: (Resource r, Resource r) => r -> AttributeValue
-- | Intercalate slashes, and add one to the front
slashPrependJoin :: RouteParts -> Route
-- | Error pages,
data ErrorPage
Status403 :: ErrorPage
Status404 :: ErrorPage
Status405 :: ErrorPage
bootstrapCss :: ForeignResource
bootstrapJs :: ForeignResource
jQueryJs :: ForeignResource
module Web.Skell.Partials
-- | Bootstrap Wrapper for Skell
defaultWrapper :: Html -> Html -> Html
-- | Wrap a Resource URL in a link tag
stylesheetTag :: Resource r => r -> Html
-- | Link to a remote stylesheet
stylesheetRemote :: ForeignResource -> Html
-- | Link to a remote stylesheet
scriptRemote :: ForeignResource -> Html
-- | Tag for any link
linkTag :: AttributeValue -> Html -> Html
-- | Email tag for any email
emailTag :: Text -> Html