From bb78a66343a77ec076e8b258e2c992bc76fd3131 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 15 May 2002 12:17:18 +0000 Subject: [PATCH] [project @ 2002-05-15 12:17:18 by simonmar] Fix comment to avoid confusing Haddock --- Text/PrettyPrint/HughesPJ.hs | 53 +++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/Text/PrettyPrint/HughesPJ.hs b/Text/PrettyPrint/HughesPJ.hs index f126af5..4297e6e 100644 --- a/Text/PrettyPrint/HughesPJ.hs +++ b/Text/PrettyPrint/HughesPJ.hs @@ -421,32 +421,33 @@ data TextDetails = Chr Char space_text = Chr ' ' nl_text = Chr '\n' --- Here are the invariants: - --- * The argument of NilAbove is never Empty. Therefore --- a NilAbove occupies at least two lines. --- --- * The arugment of @TextBeside@ is never @Nest@. --- --- --- * The layouts of the two arguments of @Union@ both flatten to the same --- string. --- --- * The arguments of @Union@ are either @TextBeside@, or @NilAbove@. --- --- * The right argument of a union cannot be equivalent to the empty set --- (@NoDoc@). If the left argument of a union is equivalent to the --- empty set (@NoDoc@), then the @NoDoc@ appears in the first line. - --- * An empty document is always represented by @Empty@. It can't be --- hidden inside a @Nest@, or a @Union@ of two @Empty@s. - --- * The first line of every layout in the left argument of @Union@ is --- longer than the first line of any layout in the right argument. --- (1) ensures that the left argument has a first line. In view of --- (3), this invariant means that the right argument must have at --- least two lines. - +{- + Here are the invariants: + + * The argument of NilAbove is never Empty. Therefore + a NilAbove occupies at least two lines. + + * The arugment of @TextBeside@ is never @Nest@. + + + * The layouts of the two arguments of @Union@ both flatten to the same + string. + + * The arguments of @Union@ are either @TextBeside@, or @NilAbove@. + + * The right argument of a union cannot be equivalent to the empty set + (@NoDoc@). If the left argument of a union is equivalent to the + empty set (@NoDoc@), then the @NoDoc@ appears in the first line. + + * An empty document is always represented by @Empty@. It can't be + hidden inside a @Nest@, or a @Union@ of two @Empty@s. + + * The first line of every layout in the left argument of @Union@ is + longer than the first line of any layout in the right argument. + (1) ensures that the left argument has a first line. In view of + (3), this invariant means that the right argument must have at + least two lines. +-} -- Arg of a NilAbove is always an RDoc nilAbove_ p = NilAbove p -- 1.7.10.4