diff options
Diffstat (limited to 'compiler/utils/Pretty.hs')
-rw-r--r-- | compiler/utils/Pretty.hs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/utils/Pretty.hs b/compiler/utils/Pretty.hs index 5adfdd7699..6e8686a62d 100644 --- a/compiler/utils/Pretty.hs +++ b/compiler/utils/Pretty.hs @@ -201,8 +201,7 @@ But it doesn't work, for if x=empty, we would have -- --------------------------------------------------------------------------- -- Operator fixity -infixl 6 <> -infixl 6 <+> +infixr 6 <+> -- matches that of (Semigroup.<>) infixl 5 $$, $+$ @@ -659,14 +658,10 @@ nilAboveNest g k q | not g && k > 0 -- No newline if no overlap -- --------------------------------------------------------------------------- -- Horizontal composition @<>@ --- We intentionally avoid Data.Monoid.(<>) here due to interactions of --- Data.Monoid.(<>) and (<+>). See --- http://www.haskell.org/pipermail/libraries/2011-November/017066.html - -- | Beside. -- '<>' is associative, with identity 'empty'. -(<>) :: Doc -> Doc -> Doc -p <> q = beside_ p False q +instance Semigroup Doc where + p <> q = beside_ p False q -- | Beside, separated by space, unless one of the arguments is 'empty'. -- '<+>' is associative, with identity 'empty'. |