
Or the combinators (<>, $$, etc) might take care to build their results in reduced form, which seems to be the strategy that "nest" takes. BTW, there's an invariant comment (about Doc, I think) that says "An empty document is always represented by @Empty@." If the combinators aren't going to ensure that's true, then probably the comment should be removed or fixed. - Conal -----Original Message----- From: Christian Maeder [mailto:maeder@tzi.de] Sent: Thursday, November 24, 2005 8:56 AM To: Conal Elliott Cc: libraries@haskell.org Subject: Re: lawbreakers in Text.PrettyPrint.HughesPJ Conal Elliott wrote:
Can you construct an example [...]
Prelude Text.PrettyPrint> isEmpty (empty<>empty) False
Indeed, isEmpty seems to be the problem that needs a fix: isEmpty d = case reduceDoc d of Empty -> True _ -> False Christian