【发布时间】:2015-09-22 12:11:09
【问题描述】:
鉴于以下情况:
test :: (Int -> Int) -> Int -> Bool
test _ _ = True
编译源码后,我尝试运行quickCheck test:
> quickCheck test
<interactive>:27:1:
No instance for (Show (Int -> Int))
arising from a use of ‘quickCheck’
In the expression: quickCheck test
In an equation for ‘it’: it = quickCheck test
看着这个Show instance for functions,我觉得不存在这样的实例。
如何运行quickCheck test,即绕过或解决Int -> Int 缺少的Show 实例?
【问题讨论】:
标签: haskell quickcheck