Commit 2603ebfb authored by Michael Hanus 's avatar Michael Hanus

Changes w.r.t. new module Test.Prop.Types

parent b50c4a44
......@@ -607,7 +607,7 @@ funDeclsWith pred = filter (pred . snd . funcName)
propResultType :: CTypeExpr -> CTypeExpr
propResultType te = case te of
CFuncType from to -> CFuncType from (propResultType to)
_ -> baseType (easyCheckModule,"Prop")
_ -> baseType (propTypesModule,"Prop")
-- Transforms a function declaration into a post condition test if
-- there is a post condition for this function (i.e., a relation named
......
......@@ -3,12 +3,12 @@
--- a Curry program.
---
--- @author Michael Hanus
--- @version December 2017
--- @version January 2019
------------------------------------------------------------------------
module PropertyUsage
( isProperty, isPropType, isPropIOType, isEquivProperty
, propModule, easyCheckModule, easyCheckExecModule
, propModule, propTypesModule, easyCheckModule, easyCheckExecModule
) where
import AbstractCurry.Types
......@@ -25,13 +25,13 @@ isProperty = isPropertyType . typeOfQualType . funcType
--- Is the type expression the type Test.EasyCheck.Prop?
isPropType :: CTypeExpr -> Bool
isPropType texp = case texp of
CTCons (mn,tc) -> tc == "Prop" && isCheckModule mn
CTCons (mn,tc) -> tc == "Prop" && mn == propTypesModule
_ -> False
--- Is the type expression the type Test.EasyCheck.PropIO?
isPropIOType :: CTypeExpr -> Bool
isPropIOType texp = case texp of
CTCons (mn,tc) -> tc == "PropIO" && isCheckModule mn
CTCons (mn,tc) -> tc == "PropIO" && mn == propTypesModule
_ -> False
--- Check whether a function definition is an equivalence property, i.e.,
......@@ -54,6 +54,10 @@ isCheckModule mn = mn == propModule || mn == easyCheckModule
propModule :: String
propModule = "Test.Prop"
--- Name of the Test.Prop.Types module (containing property type definitions).
propTypesModule :: String
propTypesModule = "Test.Prop.Types"
--- Name of the EasyCheck module.
easyCheckModule :: String
easyCheckModule = "Test.EasyCheck"
......
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