skell-0.0.1.1: 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.

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

Instances

slashPrependJoin :: [Text] -> Text Source

Intercalate slashes, and add one to the front