Commit 6806f519 authored by Michael Hanus 's avatar Michael Hanus
Browse files

Missing tests with currypp activated

parent 90ad44d2
......@@ -7,7 +7,7 @@ import Test.Prop
-- equivalent to the standard one:
-- zip2 with default rule:
zip2 :: [a] -> [b] -> [(a,b)]
zip2 :: (Data a, Data b) => [a] -> [b] -> [(a,b)]
zip2 (x:xs) (y:ys) = (x,y) : zip2 xs ys
zip2'default _ _ = []
......
......@@ -6,9 +6,10 @@
--- that the original operations are indeed deterministic.
-- Computes the last element of a list.
last :: [a] ->DET a
last :: Data a => [a] ->DET a
last (_ ++ [x]) = x
last'pre :: Data a => [a] -> Bool
last'pre = not . null
-- Definition of bubble sort with default rule as a deterministic operaion.
......
......@@ -19,36 +19,36 @@
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules #-}
import qualified List
import qualified Data.List
import Test.Prop
nub :: Eq a => [a] -> [a]
nub = List.nub
nub :: (Data a, Eq a) => [a] -> [a]
nub = Data.List.nub
nub'spec :: Eq a => [a] ->DET [a]
nub'spec :: (Data a, Eq a) => [a] ->DET [a]
nub'spec (xs++[e]++ys++[e]++zs) = nub'spec (xs++[e]++ys++zs)
nub'spec'default xs = xs
isPrefixOf :: Eq a => [a] -> [a] -> Bool
isPrefixOf = List.isPrefixOf
isPrefixOf :: (Data a, Eq a) => [a] -> [a] -> Bool
isPrefixOf = Data.List.isPrefixOf
isPrefixOf'spec :: Eq a => [a] -> [a] ->DET Bool
isPrefixOf'spec :: (Data a, Eq a) => [a] -> [a] ->DET Bool
isPrefixOf'spec xs (xs ++ _) = True
isPrefixOf'spec'default _ _ = False
isSuffixOf :: Eq a => [a] -> [a] -> Bool
isSuffixOf = List.isSuffixOf
isSuffixOf :: (Data a, Eq a) => [a] -> [a] -> Bool
isSuffixOf = Data.List.isSuffixOf
isSuffixOf'spec :: Eq a => [a] -> [a] ->DET Bool
isSuffixOf'spec :: (Data a, Eq a) => [a] -> [a] ->DET Bool
isSuffixOf'spec xs (_ ++ xs) = True
isSuffixOf'spec'default _ _ = False
isInfixOf :: Eq a => [a] -> [a] -> Bool
isInfixOf = List.isInfixOf
isInfixOf :: (Data a, Eq a) => [a] -> [a] -> Bool
isInfixOf = Data.List.isInfixOf
isInfixOf'spec :: Eq a => [a] -> [a] ->DET Bool
isInfixOf'spec :: (Data a, Eq a) => [a] -> [a] ->DET Bool
isInfixOf'spec xs (_ ++ xs ++ _) = True
isInfixOf'spec'default _ _ = False
......@@ -22,10 +22,6 @@
"setfunctions" : ">= 3.0.0, < 4.0.0",
"wl-pprint" : ">= 3.0.0, < 4.0.0"
},
"compilerCompatibility": {
"pakcs": ">= 3.0.0, < 4.0.0",
"kics2": ">= 3.0.0, < 4.0.0"
},
"configModule": "CC.Config",
"executable": {
"name": "curry-check",
......@@ -34,10 +30,14 @@
"testsuite": [
{ "src-dir": "examples",
"options": "-m70",
"modules": [ "ExampleTests",
"modules": [ "DefaultRulesTest", "DetOps", "ExampleTests",
"ExamplesFromManual", "FloatTest", "HigherOrder",
"Nats", "SEBF", "Sum", "SortSpec", "Tree" ]
},
{ "src-dir": "examples",
"options": "-m70 -e ground",
"modules": [ "ListSpecifications" ]
},
{ "src-dir": "examples/withVerification",
"modules": [ "ListProp", "SortSpec" ]
},
......
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