Skip to content

Implement rendering modes parameters #4

Open
@Martoon-00

Description

@Martoon-00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementA change or a small addition to the existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions