Re: is there a way to alter every line of an SDoc?

2021-12-06 Thread Norman Ramsey
> > I'm emitting code in which I want to prettyprint the contents > > of a Cmm Block as a comment, by which I mean putting `--` to the left > > of *each* line of the rendered Cmm Block. Using GHC.Utils.Outputable, > > is this even possible? How would I tackle it? (The Haddock page > > does

Re: is there a way to alter every line of an SDoc?

2021-12-06 Thread Ben Gamari
Norman Ramsey writes: > I'm emitting code in which I want to prettyprint the contents > of a Cmm Block as a comment, by which I mean putting `--` to the left > of *each* line of the rendered Cmm Block. Using GHC.Utils.Outputable, > is this even possible? How would I tackle it? (The Haddock pag

is there a way to alter every line of an SDoc?

2021-12-06 Thread Norman Ramsey
I'm emitting code in which I want to prettyprint the contents of a Cmm Block as a comment, by which I mean putting `--` to the left of *each* line of the rendered Cmm Block. Using GHC.Utils.Outputable, is this even possible? How would I tackle it? (The Haddock page does not suggest any obvious c