urlpath-2.0.0: Painfully simple URL writing combinators

Safe HaskellSafe
LanguageHaskell2010

Data.Url

Synopsis

Documentation

class Url plain m => UrlReader plain m where Source

Overload deployment schemes with this - then, all that's needed is a type coercion to change deployment.

Associated Types

type Result m :: * -> * Source

Methods

runUrlReader Source

Arguments

:: Url plain m 
=> m b

MonadReader with index string and result b

-> plain

Reader index

-> Result m b

Final result

Instances

(Monad m, TextualMonoid plain) => UrlReader plain (AbsoluteUrlT plain m) Source 
(Monad m, TextualMonoid plain) => UrlReader plain (GroundedUrlT plain m) Source 
(Monad m, TextualMonoid plain) => UrlReader plain (RelativeUrlT plain m) Source 

class (TextualMonoid plain, MonadReader plain m) => Url plain m where Source

Url is a relationship between an underlying string type plain, and a deployment context m. We try to make the deployment style coercible at the top level - if the expression has a type Url String (AbsoluteUrlT String Identity) or Monad m => Url T.Text (GroundedUrlT LT.Text m) will force all use-cases within the expression to coerce to that type.

Methods

queryUrl Source

Arguments

:: QueryString plain

Url type, parameterized over a string type plain

-> m plain

Rendered Url in some context.

plainUrl Source

Arguments

:: plain

raw small string

-> m plain

Rendered string in some context.

Instances

(Monad m, TextualMonoid plain) => Url plain (AbsoluteUrlT plain m) Source 
(Monad m, TextualMonoid plain) => Url plain (GroundedUrlT plain m) Source 
(Monad m, TextualMonoid plain) => Url plain (RelativeUrlT plain m) Source