From 81e8b1589e18c98b3060a421f79a0c66ca2eec5e Mon Sep 17 00:00:00 2001 From: Vladislav Zavialov Date: Mon, 20 Apr 2026 01:22:30 +0300 Subject: [PATCH] Infix constructors --- lib/Shower/Parser.hs | 2 +- tests/in-out/InfixConstructors.in | 1 + tests/in-out/InfixConstructors.out | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tests/in-out/InfixConstructors.in create mode 100644 tests/in-out/InfixConstructors.out diff --git a/lib/Shower/Parser.hs b/lib/Shower/Parser.hs index 0fee196..eaf5102 100644 --- a/lib/Shower/Parser.hs +++ b/lib/Shower/Parser.hs @@ -32,7 +32,7 @@ pPart = pTuple <|> pStringLit <|> pCharLit <|> - pAtom "()[]{},=" + pAtom "()[]{}," pRecord :: Shower a => Parser a pRecord = do diff --git a/tests/in-out/InfixConstructors.in b/tests/in-out/InfixConstructors.in new file mode 100644 index 0000000..3fbe949 --- /dev/null +++ b/tests/in-out/InfixConstructors.in @@ -0,0 +1 @@ +["x" := Lit 9,"y" := Lit 29,"x" := Lit (-1),"z" := (Var "z" :+ Var "v"),"t" := (Lit 1 :+ (Lit 2 :+ Var "u"))] diff --git a/tests/in-out/InfixConstructors.out b/tests/in-out/InfixConstructors.out new file mode 100644 index 0000000..7c348dc --- /dev/null +++ b/tests/in-out/InfixConstructors.out @@ -0,0 +1,5 @@ +["x" := Lit 9, + "y" := Lit 29, + "x" := Lit (-1), + "z" := (Var "z" :+ Var "v"), + "t" := (Lit 1 :+ (Lit 2 :+ Var "u"))]