From c0cc927e508e84900a6be59ae5b431215539c2e3 Mon Sep 17 00:00:00 2001 From: Hiroki Tokunaga Date: Mon, 9 Jan 2023 08:33:06 +0900 Subject: [PATCH] Remove spaces around typed expression brackets To match the formatting of other brackets. Fixes #638 --- TESTS.md | 2 +- src/HIndent/Pretty/Combinators/Wrap.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TESTS.md b/TESTS.md index 83b1900d5..29f0de2a0 100644 --- a/TESTS.md +++ b/TESTS.md @@ -2678,7 +2678,7 @@ f = Typed quote. ```haskell -f = [|| a ||] +f = [||a||] ``` Preserve the trailing newline. diff --git a/src/HIndent/Pretty/Combinators/Wrap.hs b/src/HIndent/Pretty/Combinators/Wrap.hs index a24fcebeb..9133089db 100644 --- a/src/HIndent/Pretty/Combinators/Wrap.hs +++ b/src/HIndent/Pretty/Combinators/Wrap.hs @@ -43,9 +43,9 @@ braces = wrap "{" "}" brackets :: Printer a -> Printer a brackets = wrap "[" "]" --- | Wraps with @[|| @ and @ ||]@. +-- | Wraps with @[||@ and @||]@. typedBrackets :: Printer a -> Printer a -typedBrackets = wrap "[|| " " ||]" +typedBrackets = wrap "[||" "||]" -- | Wraps with double quotes. doubleQuotes :: Printer a -> Printer a