packages feed

liquid-fixpoint 0.5.0.0 → 0.5.0.1

raw patch · 4 files changed

+90/−57 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

liquid-fixpoint.cabal view
@@ -1,5 +1,5 @@ name:                liquid-fixpoint-version:             0.5.0.0+version:             0.5.0.1 Copyright:           2010-15 Ranjit Jhala, University of California, San Diego. synopsis:            Predicate Abstraction-based Horn-Clause/Implication Constraint Solver homepage:            https://github.com/ucsd-progsys/liquid-fixpoint@@ -29,15 +29,24 @@  Extra-Source-Files: tests/neg/*.fq                   , tests/pos/*.fq+                  , unix/Language/Fixpoint/Utils/*.hs+                  , win/Language/Fixpoint/Utils/*.hs  Source-Repository head   Type:        git   Location:    https://github.com/ucsd-progsys/liquid-fixpoint/ +Flag devel+  Description: turn on stricter error reporting for development+  Default:     False+  Manual:      True+ Executable fixpoint   default-language: Haskell98   Main-is:       Fixpoint.hs   ghc-options:   -threaded -W -fno-warn-missing-methods+  if flag(devel)+    ghc-options: -Werror   hs-source-dirs: bin   Build-Depends: base >= 4.7 && < 5                , liquid-fixpoint@@ -45,6 +54,8 @@ Library   default-language: Haskell98   ghc-options:     -W -fno-warn-missing-methods+  if flag(devel)+    ghc-options:   -Werror   hs-source-dirs:  src   Exposed-Modules: Language.Fixpoint.Types.Names,                    Language.Fixpoint.Types.Errors,@@ -123,6 +134,7 @@     Build-Depends: located-base   if !os(windows)     Build-Depends: ascii-progress >= 0.3+    hs-source-dirs: unix   if os(windows)     hs-source-dirs: win @@ -130,7 +142,9 @@   default-language: Haskell98   type:             exitcode-stdio-1.0   hs-source-dirs:   tests-  ghc-options:      -O2 -threaded+  ghc-options:      -threaded+  if flag(devel)+    ghc-options:    -Werror   main-is:          test.hs   build-depends:    base,                     directory,
− src/Language/Fixpoint/Utils/Progress.hs
@@ -1,55 +0,0 @@--- | Progress Bar API-module Language.Fixpoint.Utils.Progress (-      withProgress-    , progressInit-    , progressTick-    , progressClose-    ) where--import           Control.Monad                    (unless)-import           System.IO.Unsafe                 (unsafePerformIO)-import           System.Console.CmdArgs.Verbosity (isLoud)-import           Data.IORef---import           System.Console.AsciiProgress--{-# NOINLINE pbRef #-}-pbRef :: IORef (Maybe ProgressBar)-pbRef = unsafePerformIO (newIORef Nothing)--withProgress :: Int -> IO a -> IO a-withProgress n act = displayConsoleRegions $ do-  -- putStrLn $ "withProgress: " ++ show n-  progressInit n-  r <- act-  progressClose-  return r--progressInit :: Int -> IO ()-progressInit n = do-  loud <- isLoud-  unless loud $ do-    pr <- mkPB n-    writeIORef pbRef (Just pr)--mkPB   :: Int -> IO ProgressBar--mkPB n = newProgressBar def { pgWidth       = 80-                            , pgTotal       = toInteger n-                            , pgFormat      = "Working :percent [:bar]"-                            , pgPendingChar = '.'-                            , pgOnCompletion = Just "Done solving." --  :percent."-                            }--progressTick :: IO ()-progressTick    = go =<< readIORef pbRef-  where-   go (Just pr) = tick pr-   go _         = return ()--progressClose :: IO ()-progressClose = go =<< readIORef pbRef-  where-    go (Just p) = complete p-    go _        = return ()
+ unix/Language/Fixpoint/Utils/Progress.hs view
@@ -0,0 +1,55 @@+-- | Progress Bar API+module Language.Fixpoint.Utils.Progress (+      withProgress+    , progressInit+    , progressTick+    , progressClose+    ) where++import           Control.Monad                    (unless)+import           System.IO.Unsafe                 (unsafePerformIO)+import           System.Console.CmdArgs.Verbosity (isLoud)+import           Data.IORef+++import           System.Console.AsciiProgress++{-# NOINLINE pbRef #-}+pbRef :: IORef (Maybe ProgressBar)+pbRef = unsafePerformIO (newIORef Nothing)++withProgress :: Int -> IO a -> IO a+withProgress n act = displayConsoleRegions $ do+  -- putStrLn $ "withProgress: " ++ show n+  progressInit n+  r <- act+  progressClose+  return r++progressInit :: Int -> IO ()+progressInit n = do+  loud <- isLoud+  unless loud $ do+    pr <- mkPB n+    writeIORef pbRef (Just pr)++mkPB   :: Int -> IO ProgressBar++mkPB n = newProgressBar def { pgWidth       = 80+                            , pgTotal       = toInteger n+                            , pgFormat      = "Working :percent [:bar]"+                            , pgPendingChar = '.'+                            , pgOnCompletion = Just "Done solving." --  :percent."+                            }++progressTick :: IO ()+progressTick    = go =<< readIORef pbRef+  where+   go (Just pr) = tick pr+   go _         = return ()++progressClose :: IO ()+progressClose = go =<< readIORef pbRef+  where+    go (Just p) = complete p+    go _        = return ()
+ win/Language/Fixpoint/Utils/Progress.hs view
@@ -0,0 +1,19 @@+-- | Progress Bar API+module Language.Fixpoint.Utils.Progress (+      withProgress+    , progressInit+    , progressTick+    , progressClose+    ) where++withProgress :: Int -> IO a -> IO a+withProgress _ x = x++progressInit :: Int -> IO ()+progressInit _ = return ()++progressTick :: IO ()+progressTick = return ()++progressClose :: IO ()+progressClose = return ()