From 3b20f8a9e85696b86f698e1bdbdbd31b786b77c2 Mon Sep 17 00:00:00 2001 From: Arnaud Bailly Date: Fri, 17 Oct 2025 16:49:32 +0200 Subject: feat: parses single application --- lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs') diff --git a/lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs b/lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs index ea7cd89..b52017a 100644 --- a/lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs +++ b/lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs @@ -20,6 +20,9 @@ spec = parallel $ do nestedAbs = Abs vars (Sym body) in parse ("(lam (" <> Text.unwords vars <> ") " <> body <> ")") `shouldBe` Right nestedAbs + prop "parses an application" $ \(Identifier ident1) (Identifier ident2) -> + parse ("(" <> ident1 <> " " <> ident2 <> ")") `shouldBe` Right (App (Sym ident1) (Sym ident2)) + newtype Identifier = Identifier {unIdent :: Text} deriving (Eq, Show) -- cgit v1.2.3