urlpath-3.0.0: Painfully simple URL deployment.

Safe HaskellNone
LanguageHaskell2010

Data.Url

Contents

Synopsis

Classes

class Url b m where Source

Methods

pathUrl :: Path b t -> m String Source

locUrl :: Location b t -> m String Source

symbolUrl :: ToLocation s b t => s -> m String Source

Instances

(Url b m, MonadTrans t, Monad m) => Url b (t m) Source 
Applicative m => Url Rel (RelativeUrlT m) Source 
Applicative m => Url Abs (AbsoluteUrlT m) Source 
Applicative m => Url Abs (GroundedUrlT m) Source 

class ToLocation a b t | a -> b t where Source

Make an instance for your own stringless route type to use your symbols instead of strings or Path.

Methods

toLocation :: a -> Location b t Source

class UrlReader m where Source

Overload extraction for deployment transformers.

Associated Types

type RunUrlReader m :: * -> * Source

Methods

runUrlReader Source

Arguments

:: m a

MonadReader with index string and result b

-> UrlAuthority

URI Scheme, hostname, and other details

-> RunUrlReader m a

Final result

Types

data UrlAuthority Source

The hostname of a URL.

Instances

Eq UrlAuthority Source 
Ord UrlAuthority Source 
Show UrlAuthority Source 
Monad m => MonadReader UrlAuthority (AbsoluteUrlT m) Source

Returns the base that urls are appended to - the host

Relative Urls

newtype RelativeUrlT m a Source

Constructors

RelativeUrlT 

Fields

runRelativeUrlT :: UrlAuthority -> m a
 

Instances

Grounded Urls

newtype GroundedUrlT m a Source

Constructors

GroundedUrlT 

Fields

runGroundedUrlT :: UrlAuthority -> m a
 

Absolute Urls

newtype AbsoluteUrlT m a Source

Constructors

AbsoluteUrlT 

Fields

runAbsoluteUrlT :: UrlAuthority -> m a