Commit 1c2392d7 authored by Michael Hanus 's avatar Michael Hanus

diff behavior: restrictions on float operations removed since this is now supported with EasyCheck.

parent c8a58047
......@@ -283,12 +283,14 @@ package specification) and report any differences and whether they violate
semantic versioning. It will also generate a CurryCheck program that will
compare the behavior of all exported functions in all exported modules whose
types have not changed and execute that program. Note that not all functions
can be compared via CurryCheck. In particular, functions taking other functions
as arguments can not be checked, as well as functions taking \verb|Float|
arguments. There are a few other minor restrictions. Also note that the
can be compared via CurryCheck.
In particular, functions taking other functions as arguments
can not be checked.
There are a few other minor restrictions. Also note that the
generated program may not terminate if one of the versions of the function
does not terminate, for example if it generates an infinite list. In this case,
you can mark those functions with the compiler pragma \verb|{-# NOCOMPARE -#}|
does not terminate, for example if it generates an infinite list.
In this case, one can mark those functions with the compiler pragma
\verb|{-# NOCOMPARE -#}|
and CPM will not generate tests for them, e.g.
\begin{lstlisting}
......@@ -345,8 +347,10 @@ package, which contain subdirectories for all versions of that package which in
turn contain the package specification files. So the specification for version
$1.0.5$ of the \verb|json| package would be located in \verb|json/1.0.5/package.json|.
If you have access to the Git repository containing the central package index,
then you can add the package specification yourself. If you do not have access,
then send the file to someone who does.
then you can add the package specification yourself.
Otherwise, send your package specification file to
\url{packages@curry-language.org} in order to publish it.
\section{Configuration}
......
......@@ -180,7 +180,6 @@ renderRemoved rs =
reasonText NonMatchingTypes = text "Some types inside the function type differ"
reasonText HighArity = text "Arity too high"
reasonText NoCompare = text "Marked NOCOMPARE"
reasonText FloatArg = text "Takes Float arguments"
reasonText FuncArg = text "Takes functions as arguments"
--- Runs CurryCheck on the generated program.
......@@ -618,7 +617,6 @@ findFunctionsToCompare cfg repo gc dirA dirB = loadPackageSpec dirA |>=
areHighArityThenFilter = thenFilter allFuncs HighArity
areNoCompareThenFilter = thenFilter allFuncs NoCompare
areNonMatchingThenFilter = thenFilter allFuncs NonMatchingTypes
haveFloatArgThenFilter = thenFilter allFuncs FloatArg
haveFuncArgThenFilter = thenFilter allFuncs FuncArg
in
emptyFilter ((liftFilter $ filterDiffingFunctions diffs) acy allFuncs)
......@@ -626,7 +624,6 @@ findFunctionsToCompare cfg repo gc dirA dirB = loadPackageSpec dirA |>=
liftFilter filterHighArity `areHighArityThenFilter`
filterNoCompare dirA dirB depsA `areNoCompareThenFilter`
filterNonMatchingTypes dirA dirB depsA `areNonMatchingThenFilter`
filterFloatArg dirA dirB depsA `haveFloatArgThenFilter`
filterFuncArg dirA dirB depsA `haveFuncArgThenFilter`
liftFilter id
where
......@@ -644,7 +641,6 @@ data FilterReason = NoReason
| NoCompare
| NonMatchingTypes
| Diffing
| FloatArg
| FuncArg
--- Chain filter functions and mark the ones removed by the previous filter
......@@ -664,19 +660,9 @@ thenFilter allFuncs r st f =
--- Lifts a simple filter to a filter that executes inside the IO monad and
--- takes an ACYCache.
liftFilter :: ([CFuncDecl] -> [CFuncDecl])
-> (ACYCache -> [CFuncDecl] -> IO (ErrorLogger (ACYCache, [CFuncDecl])))
-> (ACYCache -> [CFuncDecl] -> IO (ErrorLogger (ACYCache, [CFuncDecl])))
liftFilter f = \a fs -> succeedIO (a, f fs)
--- Excludes those functions which take a Float argument, either directly or
--- via a nested type.
filterFloatArg :: String -> String -> [Package] -> ACYCache -> [CFuncDecl]
-> IO (ErrorLogger (ACYCache, [CFuncDecl]))
filterFloatArg = filterFuncsDeep checkFloat
where
checkFloat (CFuncType _ _) = False
checkFloat (CTVar _) = False
checkFloat (CTCons n _) = n == ("Prelude", "Float")
--- Excludes those functions which take a functional argument, either directly
--- or via a nested type.
filterFuncArg :: String -> String -> [Package] -> ACYCache -> [CFuncDecl]
......
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