1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
\documentclass{article}
%include lhs2TeX.fmt
%include lhs2TeX.sty
%include spacing.fmt
\begin{document}
It is irrelevant how typ is formatted, but it must be a parametrized
format for the bug to be triggered.
%format typ(a) = a
This is a @lhs2TeX@ bug. The double colons are not aligned, although
they should be.
\begin{code}
map ^^ typ( a1 :: *, a2 :: * ) :: (map ^^ typ(a1,a2)) => a1 -> a2
zipWith^^ typ( a1 :: *, a2 :: *, a3 :: * ) :: (zipWith ^^ typ(a1,a2,a3)) => a1 -> a2 -> a3
collect^^ typ( a :: * | b :: * ) :: (collect ^^ typ(a | b)) => a -> [c]
equal ^^ typ( a :: * ) :: ( enum ^^ typ(a), equal ^^ typ(a))
=> a -> a -> Bool ^^.
\end{code}
This is a workaround:
\begin{code}
map ^^ typ( a1 :: *, a2 :: * ) ^ :: (map ^^ typ(a1,a2)) => a1 -> a2
zipWith^^ typ( a1 :: *, a2 :: *, a3 :: * ) ^ :: (zipWith ^^ typ(a1,a2,a3)) => a1 -> a2 -> a3
collect^^ typ( a :: * | b :: * ) ^ :: (collect ^^ typ(a | b)) => a -> [c]
equal ^^ typ( a :: * ) ^ :: ( enum ^^ typ(a), equal ^^ typ(a))
=> a -> a -> Bool ^^.
\end{code}
\end{document}
|