From c1acd386623e0e06b9175a6f201255e310e7dad9 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Mon, 10 Apr 2023 16:49:55 +0200 Subject: ch05: Fix compilation errors in the files from examples --- ch05/Prettify.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ch05/Prettify.hs') diff --git a/ch05/Prettify.hs b/ch05/Prettify.hs index 7b3ea10..c33a4ae 100644 --- a/ch05/Prettify.hs +++ b/ch05/Prettify.hs @@ -3,7 +3,7 @@ module Prettify -- * Constructors Doc -- * Basic combinators - , (<>) + , (Prettify.<>) , empty , char , text @@ -65,7 +65,7 @@ line = Line {-- snippet hcat --} hcat :: [Doc] -> Doc -hcat = fold (<>) +hcat = fold (Prettify.<>) fold :: (Doc -> Doc -> Doc) -> [Doc] -> Doc fold f = foldr f empty @@ -76,7 +76,7 @@ fsep :: [Doc] -> Doc fsep = fold () () :: Doc -> Doc -> Doc -x y = x <> softline <> y +x y = x Prettify.<> softline Prettify.<> y softline :: Doc softline = group line @@ -99,7 +99,7 @@ flatten other = other punctuate :: Doc -> [Doc] -> [Doc] punctuate p [] = [] punctuate p [d] = [d] -punctuate p (d:ds) = (d <> p) : punctuate p ds +punctuate p (d:ds) = (d Prettify.<> p) : punctuate p ds {-- /snippet punctuate --} {-- snippet compact --} -- cgit v1.2.3