Closed phadej closed 7 years ago
I'll check the Reader
approach too when the #4 is merged. It's easier to check the performance affects when we have some benchmarks in place.
I'm wondering if using a "KnownNat" isn't overkill. We could be using a simple parameter to the render function, like every pretty printing library does.
I'll do a parameter version shortly.
@jyp check my other PR #6
Builds on my other PR. The drawback of this approach is that
pretty-compact
would work only with GHC>=7.8.Another option is to change
newtype Doc a = MkDoc (Reader Int [(M a, L a)])
.