lawbreakers in Text.PrettyPrint.HughesPJ
Christian Maeder
maeder at tzi.de
Thu Dec 22 11:23:10 EST 2005
Hi Simon,
> | Christian Maeder wrote:
> | I became a problem with my (Conal's) suggested patch on a mac. When
> | compiled with optimization the code was so blown up that it could no
> | longer be linked on a mac. (The problem does not occur if only isEmpty
> | is changed as suggested before.)
Before HughesPJ.hs does not get fixed at all, because of the open
"object code blow up by minor source code change" bug
http://hackage.haskell.org/trac/ghc/ticket/490
You may apply the alternative patch (attached), that worked for me.
Cheers Christian
-------------- next part --------------
Index: HughesPJ.hs
===================================================================
RCS file: /cvs/fptools/libraries/base/Text/PrettyPrint/HughesPJ.hs,v
retrieving revision 1.17
diff -u -r1.17 HughesPJ.hs
--- HughesPJ.hs 22 Sep 2005 09:43:01 -0000 1.17
+++ HughesPJ.hs 22 Dec 2005 16:11:27 -0000
@@ -582,8 +582,9 @@
empty = Empty
-isEmpty Empty = True
-isEmpty _ = False
+isEmpty d = case reduceDoc d of
+ Empty -> True
+ _ -> False
char c = textBeside_ (Chr c) 1 Empty
text s = case length s of {sl -> textBeside_ (Str s) sl Empty}
More information about the Libraries
mailing list