]> hydra-www.ietfng.org Git - dyna2/commitdiff
Small, non-functional changes around the tree
authorNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Mon, 8 Jul 2013 04:00:25 +0000 (00:00 -0400)
committerNathaniel Wesley Filardo <nwf@cs.jhu.edu>
Mon, 8 Jul 2013 04:00:25 +0000 (00:00 -0400)
.gitignore
Setup.hs [new file with mode: 0644]
docs/sphinx/conf.py
dyna.cabal
src/Dyna/Analysis/ANF.hs
src/Dyna/Backend/Python/Selftest.hs
src/Dyna/Main/Driver.hs
src/Dyna/XXX/TrifectaTests.hs

index 49f4a3ef94fa75f2afbde882b05831f4004d8bad..5ab3da72618bb2c4264649ea242a2c070e8e3c94 100644 (file)
@@ -23,3 +23,6 @@ test/*/*.plan.py
 test/*/*.anf
 
 libpeerconnection.log
+
+tags
+TAGS
diff --git a/Setup.hs b/Setup.hs
new file mode 100644 (file)
index 0000000..9a994af
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
index 851e3993c8375a79b93af2db6db7cd32126ccb9a..37604681bd0fd933280869340296b31e250f329d 100644 (file)
@@ -63,7 +63,7 @@ except:
 try:
   release = version + ' git=' + subprocess.check_output(["git", "describe", "--always"])
 except subprocess.CalledProcessError:
-  release = '?'
+  release = version + ' gitless'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
index 3e941c3185841ad0fe945658824a6431c00d24e0..8a2e126e0bb016686ac13fb4ddcc8693f45ef85b 100644 (file)
@@ -4,7 +4,7 @@ Version:        0.4
 Cabal-Version:  >=1.14
 Build-Type:     Simple
 Stability:      alpha
-Copyright:      Copyright (c) 2007-2012,
+Copyright:      Copyright (c) 2007-2013,
                       Nathaniel W. Filardo, Tim Vieira, wren ng thornton
 License:        OtherLicense
 License-File:   LICENSE
@@ -101,7 +101,7 @@ Executable dyna
                         -main-is Dyna.Main.Driver
 
     Build-Depends:      ansi-wl-pprint >= 0.6,
-                        base >=4,
+                        base >=4 && <6,
                         bytestring >=0.9,
                         charset >=0.3,
                         containers >=0.4,
@@ -136,7 +136,7 @@ Test-suite dyna-selftests
                         -main-is Dyna.Main.TestsDriver
 
     Build-Depends:      ansi-wl-pprint >= 0.6,
-                        base >=4,
+                        base >=4 && <6,
                         bytestring >=0.9,
                         charset >=0.3,
                         containers >=0.4,
index 8a9ec4288c02026bc5b722c9229519e55315b51a..3f4a0f94a9c8ed1d54fb1954aa19a5493d49857a 100644 (file)
@@ -55,7 +55,7 @@
 module Dyna.Analysis.ANF (
        Crux, EvalCrux(..), UnifCrux(..), cruxIsEval, cruxVars, allCruxVars,
        
-    Rule(..), ANFAnnots, ANFWarns,
+    Rule(..), RuleIx, ANFAnnots, ANFWarns,
     normTerm, normRule, runNormalize,
 
        -- * Internals
index 67a3dc3882306454ef8da693ce6aeab973159a62..abd4a3fbcc80c543d3f75fc42fb40d9edaf0c693 100644 (file)
@@ -17,7 +17,6 @@ import           System.IO
 import           System.IO.Error
 import           System.Process
 import           Test.Framework                      as TF
-import           Test.Framework.Providers.Program
 import           Test.Framework.TH
 import           Test.Golden
 
index dd076cbcff7e7b6662de1983887a218bba8a3e2e..d92ba66f8e4ebad5389c7e265acd306ce7aed02d 100644 (file)
@@ -23,6 +23,7 @@ import qualified Data.IntMap                  as IM
 import qualified Data.Maybe                   as MA
 import qualified Data.Set                     as S
 import           Data.String
+import           Data.Version (showVersion)
 import           Dyna.Analysis.Aggregation
 import           Dyna.Analysis.ANF
 import           Dyna.Analysis.ANFPretty
@@ -48,6 +49,14 @@ import qualified Text.PrettyPrint.ANSI.Leijen as PPA
 import qualified Text.Trifecta                as T
 import qualified Text.Trifecta.Result         as TR
 
+import qualified Paths_dyna                   as CPD
+
+------------------------------------------------------------------------}}}
+-- Version display                                                      {{{
+
+version :: String
+version = showVersion (CPD.version)
+
 ------------------------------------------------------------------------}}}
 -- Dumping                                                              {{{
 
@@ -174,9 +183,6 @@ quickExit QEHelpDump = do
 quickExit QEVersion = putStrLn $ "Dyna " ++ version
 quickExit QEVersionNumber = putStrLn version
 
-version :: String
-version = "0.4" -- XREF:VERSION
-
 qeBanner :: String -> IO ()
 qeBanner s = putStrLn $ "Dyna " ++ version ++ ": " ++ s
 
@@ -326,7 +332,7 @@ renderSpannedWarn w s = "WARNING:" <+> text (BU.toString w) <+> "AT"
 ------------------------------------------------------------------------}}}
 -- Pipeline!                                                            {{{
 
-processFile :: (?dcfg :: DynacConfig) => String -> IO ()
+processFile :: (?dcfg :: DynacConfig) => FilePath -> IO ()
 processFile fileName = bracket openOut hClose go
  where
   openOut = maybe (return stdout) (flip openFile WriteMode)
index f0a4c1a3d982dd74b72b063e4c9b0c89874c188b..1ebc850ab57d9f74d1332aee59c1f4f5646f9fa1 100644 (file)
@@ -10,19 +10,23 @@ import qualified Test.Framework                      as TF
 import           Test.Framework.Providers.HUnit
 import           Test.Framework.TH
 import           Test.HUnit
+import qualified Text.PrettyPrint.ANSI.Leijen        as PPA
 import           Text.Trifecta
 
 import           Dyna.XXX.Trifecta
 import           Dyna.XXX.TrifectaTest
 
+pa :: Parser String
 pa = parens (many $ char 'a')
 
+case_incrementality0 :: Assertion
 case_incrementality0 =
       unsafeFS (parseByteString pa mempty fullstr)
   @=? unsafeFS (starve (feed fullstr (stepParser (release mempty *> pa) mempty B8.empty)))
  where
    fullstr = B8.pack "(aa)"
 
+case_incrementality1 :: Assertion
 case_incrementality1 =
       unsafeFS (parseByteString pa mempty fullstr)
   @=? unsafeFS (starve (feed tstr (feed istr (stepParser (release mempty *> pa) mempty B8.empty))))
@@ -42,6 +46,7 @@ _case_incrementality2 =
    tstr = B8.pack "a)"
  -}
 
+interactTest :: (Show a) => Parser a -> [String] -> (Either PPA.Doc a, [String])
 interactTest p (i:is) = runState (triInteract p next success failure i) is
  where
   next = do