Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

User context should be part of the HtmlT m #871

Open
andorp opened this issue Jul 18, 2016 · 2 comments
Open

User context should be part of the HtmlT m #871

andorp opened this issue Jul 18, 2016 · 2 comments

Comments

@andorp
Copy link
Collaborator

andorp commented Jul 18, 2016

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.

@fisx
Copy link
Collaborator

fisx commented Jul 18, 2016

👍

@andorp
Copy link
Collaborator Author

andorp commented Jul 28, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants