diff options
Diffstat (limited to 'lambda-calcul/haskell/test')
| -rw-r--r-- | lambda-calcul/haskell/test/Minilang/Lambda/ParserSpec.hs | 3 |
1 files changed, 3 insertions, 0 deletions
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) |
