1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 15:35:14 +03:00

Fix the evaluator spec.

This commit is contained in:
Rob Rix 2018-05-30 17:20:08 -04:00
parent bcf9338b75
commit 08cf65718f

View File

@ -20,13 +20,13 @@ spec :: Spec
spec = parallel $ do
it "constructs integers" $ do
(expected, _) <- evaluate (pure (integer 123))
expected `shouldBe` Right (Value.Integer (Number.Integer 123))
fst <$> expected `shouldBe` Right (Value.Integer (Number.Integer 123))
it "calls functions" $ do
(expected, _) <- evaluate $ do
identity <- closure [name "x"] lowerBound (variable (name "x"))
call identity [pure (integer 123)]
expected `shouldBe` Right (Value.Integer (Number.Integer 123))
fst <$> expected `shouldBe` Right (Value.Integer (Number.Integer 123))
evaluate
= runM