packages feed

language-sygus 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+21/−9 lines, 3 filesdep ~basedep ~text

Dependency ranges changed: base, text

Files

language-sygus.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                language-sygus-version:             0.1.0.0+version:             0.1.1.0 synopsis:            A parser and printer for the SyGuS 2.0 language.    description:         A parser and printer for the SyGuS 2.0 language.  <https://sygus.org/assets/pdf/SyGuS-IF_2.0.pdf> license:             BSD3@@ -26,16 +26,16 @@                        , Sygus.Syntax   -- other-modules:          -- other-extensions:    -  build-depends:         array >= 0.5 && < 0.6-                       , base >=4.10 && <=4.12-                       , text >= 1.1 && <= 1.3+  build-depends:         array >= 0.3 && < 0.6+                       , base >=4.10 && < 4.13+                       , text >= 1.1 && < 1.3   hs-source-dirs:      src   default-language:    Haskell2010   ghc-options:         -Wall  test-suite test   build-depends:         base >=4.10 && <=4.12-                       , deepseq >= 1.4 && <1.5+                       , deepseq >= 1.1 && <1.5                        , language-sygus                        , tasty >= 1.0                        , tasty-hunit >= 0.10
src/Sygus/Print.hs view
@@ -13,7 +13,9 @@     printSygus :: sy -> Text  instance PrintSygus Lit where-    printSygus (LitNum i) = pack $ show i+    printSygus (LitNum i)+        | i >= 0 = pack $ show i+        | otherwise = pack $ "- " ++ show (abs i)     printSygus (LitDec s) = pack s     printSygus (LitBool b) = printSygus b     printSygus (Hexidecimal s) = pack s
tests/Test.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE OverloadedStrings #-}+ module Main where  import Sygus.LexSygus@@ -13,15 +15,19 @@ main = do   pt <- parseTests   pr <- parseAndPrintsTests-  defaultMain $ testGroup "all" [ pt, pr ]+  defaultMain $ testGroup "all" [ pt, pr, printTests ]  parseTests :: IO TestTree-parseTests = return . testGroup "Tests" =<< mapM checkParses files+parseTests = return . testGroup "Parse" =<< mapM checkParses files  parseAndPrintsTests :: IO TestTree parseAndPrintsTests =-    return . testGroup "Tests" =<< mapM checkParsesAndPrints files+    return . testGroup "Parse and print" =<< mapM checkParsesAndPrints files +printTests :: TestTree+printTests =+    testGroup "Print" [printTest1]+ files :: [FilePath] files =     [ "tests/sygus/example1.sl"@@ -49,3 +55,7 @@     return $ testCase fp               $ assertBool fp                 (p1 == p2)++printTest1 :: TestTree+printTest1 = testCase "Negative Number"+              $ assertBool "Negative Number" (printSygus (LitNum (-1)) == "- 1")