Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement rendering modes parameters #4

Open
Martoon-00 opened this issue Feb 10, 2022 · 0 comments
Open

Implement rendering modes parameters #4

Martoon-00 opened this issue Feb 10, 2022 · 0 comments
Labels
improvement A change or a small addition to the existing functionality

Comments

@Martoon-00
Copy link
Member

Martoon-00 commented Feb 10, 2022

For instance, when rendering a floating-point number, it is desired to specify the precision manually.

For instance, we can allow writing it like

myText = [int||My value is #f[3]{ value }|]

To avoid breaking changes (and also for the user's simplicity) we can require something different than rmode'xxx :: RMode, e.g. have a special mode with parameters:

newtype ParamRMode (ps :: [Type]) (a :: Type) = ParamRMode
  { renderWithModeAndParams :: HLint ps -> a -> Builder
  }

parametrized :: RMode a -> ParamRMode ps a

And maybe we should also allow for named parameters? But not in this iteration I guess.

@Martoon-00 Martoon-00 added the improvement A change or a small addition to the existing functionality label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement A change or a small addition to the existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant