Commit d92889bf authored by Michael Hanus 's avatar Michael Hanus
Browse files

kics2 check: extended to generate floats

parent ae8cee50
......@@ -298,7 +298,7 @@ createTests opts mainmodname tm = map createTest (propTests tm)
[configOpWithMaxFail, CVar msgvar] ++
(map (\t ->
applyF (easyCheckModule,"valuesOfSearchTree")
[if isPAKCS || useUserDefinedGen t
[if isPAKCS || useUserDefinedGen t || isFloatType t
then type2genop mainmodname tm t
else applyF (searchTreeModule,"someSearchTree")
[constF (pre "unknown")]])
......@@ -348,6 +348,10 @@ type2genop mainmod tm (CTCons qt targs) =
applyF (typename2genopname mainmod (generators tm) qt)
(map (type2genop mainmod tm) targs)
isFloatType :: CTypeExpr -> Bool
isFloatType texp = case texp of CTCons tc [] -> tc == (preludeName,"Float")
_ -> False
typename2genopname :: String -> [QName] -> QName -> QName
typename2genopname mainmod definedgenops (mn,tc)
| isJust maybeuserdefined -- take user-defined generator:
......
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