skell-0.1.0.0: An overly complex Haskell web framework.

Copyright2014, Peter Harpending.
LicenseBSD3
MaintainerPeter Harpending <pharpend2@gmail.com>
Stabilityexperimental
Portabilityarchlinux
Safe HaskellNone
LanguageHaskell2010

Web.Skell.Saferoute

Description

 

Synopsis

Documentation

type Route = Text Source

The type for a route - just an alias for Text

class Eq r => Resource r where Source

The type class for a resource.

Minimal complete definition

getRoute, (resourceList | routeResourceMap)

Methods

getRoute :: r -> Route Source

resourceList :: [r] Source

A list of all of the constructors for your resource type.

routeResourceMap :: Map Route r Source

A map from a route to it's resource.

lookupRoute :: Route -> Maybe r Source

Given a Route, find the Resource behind it. If the route isn't associated with any Resource, this returns Nothing.

lookupRouteParts :: RouteParts -> Maybe r Source

Lookup a set of route parts

getUrl :: Resource r => r -> AttributeValue Source

slashPrependJoin :: RouteParts -> Route Source

Intercalate slashes, and add one to the front

data ErrorPage Source

Error pages,

Constructors

Status403 
Status404 
Status405