Open spl opened 12 years ago
I came here to open this ticket, and saw that it was here. I absolutely agree. They are briefly documented, but there are no examples.
I'm hitting a problem regularly where I define a product type and my constructors are centered. Wrong. I'm having to add an empty word that renders to nothing after them, but then the Haskell code is invalid.
Could someone, please, add an example to align the following code nicely to the left (notice the double spaces)?
data A = A1LongWord
| A2
| ...
I usually do the following:
%if style /= newcode
%format DOTS = "\dots"
%endif
\begin{code}
data A = A1LongWord
| A2
| DOTS
\end{code}
I know that's a workaround, and not answering your original question. But it's much more robust than working with \aligncolumn
, because \aligncolumn
forces me to specify the column number manually, and if I later edit the code, it's very easy to forget to adapt that number.
Ok. I'll do that for this case. But, more generally, how would you align the column to the left here. I must be making a very stupid mistake, but a simple align column 4 to the left wouldn't work.
It seems there has been a TODO in the guide for a long time.