packages feed

saferoute 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+8/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Web.Saferoute: type RoutePart = Text
+ Web.Saferoute.Blaze: type ForeignResource = AttributeValue

Files

saferoute.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                saferoute-version:             0.1.0.0+version:             0.1.1.0 synopsis:            A simple type-safe routing library. description:            saferoute is a type-safe routing library for web applications.
src/Web/Saferoute.hs view
@@ -15,6 +15,7 @@  -- |The type for a route - just an alias for 'S.Text' type Route = S.Text+type RoutePart = S.Text  -- |The type class for a resource. class Eq r => Resource r where@@ -39,3 +40,4 @@   -- isn't associated with any 'Resource', this returns 'Nothing'.   lookupRoute :: Route -> Maybe r   lookupRoute route = M.lookup route routeResourceMap+
src/Web/Saferoute/Blaze.hs view
@@ -13,5 +13,10 @@ import qualified Text.Blaze.Html5 as H import           Web.Saferoute +-- |Foreign resources need only to have a URL, which needs to be an+-- embeddable attribute.+type ForeignResource = H.AttributeValue++-- |Given a 'Resource', get the URL for it. getUrl :: Resource r => r -> H.AttributeValue getUrl = H.toValue . getRoute