aula
aula copied to clipboard
User context should be part of the `HtmlT m`
The actual user context in HtmlT m () is defined in the Lucid.I18N module. It should contain more information; e.g capabilities of the user.
:+1:
The MimeRender has to be modified for this
Current:
instance (ToLang a, ToHtml a) => MimeRender IHTML a where
mimeRender _ v = runReader (renderBST $ toHtml v) (toLang v)
New:
instance (ToConfig a, ToLang a, ToHtml a) => MimeRender IHTML a where
mimeRender _ v = runReader (renderBST $ toHtml v) (HtmlCtx (toLang v) (toCfg a)
We need to reconsider this approach in the future.