Commit dff7bb76 authored by Michael Hanus 's avatar Michael Hanus

Avoid use of easycheck package

parent 058fccac
......@@ -4,7 +4,7 @@ import Test.Prop
-- Bubble sort formulation with default rule as deterministic operation:
sort :: [Int] ->DET [Int]
sort (xs++[x,y]++ys) | x>y = sort (xs++[y,x]++ys)
sort (xs ++ [x,y] ++ ys) | x>y = sort (xs ++ [y,x] ++ ys)
sort'default xs = xs
-- Precondition: we don't like to sort empty lists...
......
......@@ -7,11 +7,12 @@
import Data.Format
import Test.Prop
showInt :: Int -> String
showInt i = ``format "%+.3d",i''
-- Bubble sort formulation with default rule as deterministic operation:
sort :: (Data a, Ord a, Show a) => [a] ->DET [a]
sort (xs++[x,y]++ys) | x>y = sort (xs++[y,x]++ys)
sort (xs ++ [x,y] ++ ys) | x>y = sort (xs ++ [y,x] ++ ys)
sort'default xs = xs
-- Precondition: we don't like to sort empty lists...
......@@ -22,6 +23,7 @@ sort'pre xs = length xs > 0
sort'post :: (Data a, Ord a, Show a) => [a] -> [a] -> Bool
sort'post xs ys = length xs == length ys
sort7 = sort (map showInt [7,1,6,3,5,4,2]) -=- map (\d -> "+00"++show d) [1..7]
sort7 =
sort (map showInt [7,1,6,3,5,4,2]) -=- map (\d -> "+00" ++ show d) [1..7]
sortEmpty = toError (sort ([] :: [Int]))
......@@ -30,8 +30,7 @@
"setfunctions" : ">= 3.0.0, < 4.0.0",
"time" : ">= 3.0.0, < 4.0.0",
"wl-pprint" : ">= 3.0.0, < 4.0.0",
"xml" : ">= 3.0.0, < 4.0.0",
"easycheck" : ">= 3.0.0, < 4.0.0"
"xml" : ">= 3.0.0, < 4.0.0"
},
"sourceDirs": [ "src",
"src/IntegratedCode",
......
......@@ -21,7 +21,6 @@ import Control.Monad ( when, unless )
import Curry.Compiler.Distribution ( installDir )
import Data.Char
import Data.List
import Data.Maybe ( fromJust, isNothing )
import System.Environment ( getArgs )
import AbstractCurry.Types
......@@ -178,8 +177,8 @@ transformCProg verb opts modname srctxt orgprog outmodname = do
map (\ ((mn,fn),err) -> fn ++ " (module " ++ mn ++ "): " ++ err)
usageerrors)
error "Contract transformation aborted"
let -- to avoid constructor CFunc and references to Test.Prop
prog = addCmtFuncInProg (renameProp2EasyCheck orgprog)
let -- to avoid constructor CFunc
prog = addCmtFuncInProg orgprog --(renameProp2EasyCheck orgprog)
funposs = linesOfFDecls srctxt prog
fdecls = functions prog
funspecs = getFunDeclsWith isSpecName prog
......
......@@ -32,7 +32,7 @@ import TransICode ( translateIntCode )
cppBanner :: String
cppBanner = unlines [bannerLine,bannerText,bannerLine]
where
bannerText = "Curry Preprocessor (version of 03/01/2021)"
bannerText = "Curry Preprocessor (version of 18/01/2021)"
bannerLine = take (length bannerText) (repeat '=')
--- Preprocessor targets, i.e., kind of entities to be preprocessed:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment