-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Description
Hello,
It would be helpful to have lenses to change options when using the pandoc api.
This would not have to incur a dependency on lens, as these simple lenses can be defined using the microlens-th
package, or just the microlens
package and defining lenses manually as follows:
_optFilters :: Opts `Lens'` [FilePath]
_optFilters f Opt{..} = (\optFilters -> Opt{optFilters, ..}) <$> f optFilters
{-# INLINE _optFilters #-}
This could even be done with a DIY definition of Lens'
, and no new dependencies.
As a workaround, one can define lenses in programs or libraries that consume the pandoc api (as above), though this then scales poorly.
Would that be welcome?