Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class Url plain m => UrlReader plain m where Source
A UrlReader
is a ReaderT
monad transformer, that just has conventions
associated with it to decide how to "deploy".
In the sense I'm using here, "deployment" is really "how the hostname gets added to all urls". Change the deployment scheme by coerciing the Monad Reader.
(Monad m, Monoid plain, IsString plain) => UrlReader plain (AbsoluteUrlT plain m) | |
(Monad m, Monoid plain, IsString plain) => UrlReader plain (GroundedUrlT plain m) | |
(Monad m, Monoid plain, IsString plain) => UrlReader plain (RelativeUrlT plain m) |
class (IsString plain, Monoid plain, MonadReader plain m) => Url plain m where Source
Url
is a relationship between an underlying (monomorphic) 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.
:: UrlString plain | Url type, parameterized over a string type |
-> m plain | Rendered Url in some context. |
:: plain | raw small string |
-> m plain | Rendered string in some context. |
(Monad m, Monoid plain, IsString plain) => Url plain (AbsoluteUrlT plain m) | |
(Monad m, Monoid plain, IsString plain) => Url plain (GroundedUrlT plain m) | |
(Monad m, Monoid plain, IsString plain) => Url plain (RelativeUrlT plain m) |
module UrlPath.Types