The closest I've come to having tagged equations has been:
Code: Select all
\begin{align}
|foo| & |:: Int -> Int| \\
|foo x| & |= x| \tag{foo}
\end{align}
Code: Select all
\begin{align*}
\ensuremath{\Varid{foo}} & \ensuremath{\mathbin{::}\Conid{Int}\to \Conid{Int}} \\
\ensuremath{\Varid{foo}\;\Varid{x}} & \ensuremath{\mathrel{=}\Varid{x}} \tag{foo}
\end{align*}
Code: Select all
\begin{code}
foo :: Int -> Int| \\
foo x = x {-" \tag{foo} "-}
\end{code}
Obviously doesn't work, since the hscode environment isn't an equation environment. I've tried various things with \mbox and minipage, but nothing seems to work out. Any suggestions?
Thanks!