Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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. This only works with flat (co)monads, so monad transformers are out.
:: Url plain m | |
=> m plain b | MonadReader with index |
-> plain | Reader index |
-> b | Final result |
(Monoid plain, IsString plain) => UrlReader plain AbsoluteUrl | Hand-off host prepending to the MonadReader instance |
(Monoid plain, IsString plain) => UrlReader plain GroundedUrl | |
(Monoid plain, IsString plain) => UrlReader plain RelativeUrl |
class (IsString plain, Monoid plain, MonadReader plain (m plain)) => Url plain m where Source
Url
is a relationship between an underlying (monomorphic) string type
string
, and a deployment context m
. We try to make the deployment and
implementation type coercible at the top level - coercing your final
expression to String
or T.Text
will have all use-cases coerce to that
type, similarly with the deployment scheme.
We chose to not force MonadReader
as a superclass for m
due to the
monomorphic demand on functional dependencies.
:: UrlString plain | Url type, parameterized over small string type |
-> m plain plain | Rendered Url in some context. |
:: plain | raw small string |
-> m plain plain | Rendered string in some context. |
(Monoid plain, IsString plain) => Url plain AbsoluteUrl | |
(Monoid plain, IsString plain) => Url plain GroundedUrl | |
(Monoid plain, IsString plain) => Url plain RelativeUrl | |
(Monad m, Monoid plain, IsString plain) => Url plain (AbsoluteUrlT m) | |
(Monad m, Monoid plain, IsString plain) => Url plain (GroundedUrlT m) | |
(Monad m, Monoid plain, IsString plain) => Url plain (RelativeUrlT m) |
module UrlPath.Types