From 578774ad94a62fb3b2796d4cef9e0df622f74eab Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Fri, 29 Nov 2024 17:36:59 +0300 Subject: [PATCH 1/2] fix(eo-phi-normalizer): don't print space in an empty formation --- eo-phi-normalizer/src/Language/EO/Phi/Syntax.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-phi-normalizer/src/Language/EO/Phi/Syntax.hs b/eo-phi-normalizer/src/Language/EO/Phi/Syntax.hs index bd130a42..293dc44e 100644 --- a/eo-phi-normalizer/src/Language/EO/Phi/Syntax.hs +++ b/eo-phi-normalizer/src/Language/EO/Phi/Syntax.hs @@ -64,7 +64,7 @@ render d = rend 0 False (map ($ "") $ d []) "" rend i p = \case "[" : "]" : ts -> showString "[]" . rend i False ts "(" : ")" : (t : ts) -> handleTrailingComma "()" t ts - "⟦" : "⟧" : (t : ts) -> handleTrailingComma "⟦ ⟧" t ts + "⟦" : "⟧" : (t : ts) -> handleTrailingComma "⟦⟧" t ts "[" : ts -> char '[' . rend i False ts "(" : ts -> char '(' . new (i + 1) ts "{" : "⟦" : ts -> showChar '{' . onNewLine (i + 1) p . showChar '⟦' . new (i + 2) ts From b816ffb839822eb573cf445accdf92467f53daf4 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Fri, 29 Nov 2024 17:37:12 +0300 Subject: [PATCH 2/2] fix(eo-phi-normalizer): update test --- eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml b/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml index 786a52a3..7d0660ec 100644 --- a/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml +++ b/eo-phi-normalizer/test/eo/phi/from-eo/as-phi.yaml @@ -71,7 +71,7 @@ tests: { ⟦ m ↦ ⟦ - x ↦ ⟦ ⟧ + x ↦ ⟦⟧ ⟧ () ⟧