úÎ; 7Ò6      !"#$%&'()*+,-./012345 Safe-Inferred !"-2346 uConcrete Monad for automatically coercing HtmlT's to use a mode of Url rendering (relative, grounded, or absolute). pfoo :: HtmlT RelativeUrl () foo = do path <- lift $ url $ "foo.php" <?> ("bar","baz") script_ [src_ path] ""'when running the monad reader, use the  runUrlReader member function of the  UrlReader typeclass: Ybar :: ( IsString a, Monoid a ) => a bar = (runUrlReader (renderTextT foo)) "example.com"GTo change the deployment sheme, simply coerce the environment monad in foo.6Rendering mode transformer. This isn't an instance of  UrlReader - to use, simple lift as many levels as you need: €foo :: Monad m => HtmlT (RelativeUrlT m) () foo = do path <- lift $ url $ "foo.php" <?> ("bar","baz") script_ [src_ path] ""When rendering foo, simply use the Transformer's run& function to convert it to a reader: gbar :: ( Monad m, IsString a, Monoid a ) => m a bar = (runRelativeUrlT (renderTextT foo)) "example.com"SA Url string - a target page and GET parameters. We only require a constraint of IsStringY so that construction can be convenient, but rendering will require a monomorphic type.We choose to not provide a Show instance for  UrlString to evade the String demand.8Lifts a raw target path and a GET parameter pair into a  UrlString.%Adds another GET parameter pair to a  UrlString.!Render the Url String as relative!Render the Url String as grounded<Render the Url String as absolute - getting the root from a  MonadReader context. The Monoid` instance will be decided monomorphically, therefore a type signature will be needed when ran.HRender the Url String as absolute, but with your own configuration type. ÿ€data SiteConfig = SiteConfig { host :: T.Text , cdnHost :: T.Text } deriving (Show, Eq) foo :: HtmlT (Reader SiteConfig) () foo = do url <- lift $ expandAbsoluteWith ("foo.php" <?> ("bar","baz")) host script_ [src_ url] "" bar :: LT.Text bar = (runReader (runTextT foo)) $ SiteConfig "example.com" "cdn.example.com"1  Target string GET ParameterOld UrlAdditional GET Parameter !"#$%&'()*+,-./0 10/. -,+ *)('&%$#"! $    !"#$%&'()*+,-./0  Safe-Inferred )2346=HKM1±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.3UrlD 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 allG 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.64Hand-off host prepending to the MonadReader instance12MonadReader with index string and result b Reader index Final result34Url type, parameterized over small string type stringRendered Url in some context.5raw small string Rendered string in some context.7896:;<=>  1234512345 123457896:;<=>?         !"#$%&'()*+,-./0123456789:;urlpath-0.1.0.1 UrlPath.TypesUrlPath AbsoluteUrlrunAbsoluteUrl AbsoluteUrlTrunAbsoluteUrlT GroundedUrlrunGroundedUrl GroundedUrlTrunGroundedUrlT RelativeUrlrunRelativeUrl RelativeUrlTrunRelativeUrlT UrlString showUrlString<&>expandRelativeexpandGroundedexpandAbsoluteexpandAbsoluteWith$fMonadReaderaAbsoluteUrl$fMonadAbsoluteUrl$fApplicativeAbsoluteUrl$fFunctorAbsoluteUrl$fMonadReaderhAbsoluteUrlT$fMonadAbsoluteUrlT$fApplicativeAbsoluteUrlT$fFunctorAbsoluteUrlT$fMonadReaderaGroundedUrl$fMonadGroundedUrl$fApplicativeGroundedUrl$fFunctorGroundedUrl$fMonadReaderhGroundedUrlT$fMonadGroundedUrlT$fApplicativeGroundedUrlT$fFunctorGroundedUrlT$fMonadReaderaRelativeUrl$fMonadRelativeUrl$fApplicativeRelativeUrl$fMonadReaderhRelativeUrlT$fMonadRelativeUrlT$fApplicativeRelativeUrlT UrlReader runUrlReaderUrlurlplainUrl$fUrlReaderplainAbsoluteUrl$fUrlplainAbsoluteUrlT$fUrlplainGroundedUrlT$fUrlplainRelativeUrlT$fUrlplainAbsoluteUrl$fUrlReaderplainGroundedUrl$fUrlplainGroundedUrl$fUrlReaderplainRelativeUrl$fUrlplainRelativeUrl