是否可以查询ghci的统一类型?
例如,如果我想知道 (Int -> Bool)
和 (a -> Bool)
之间的统一类型,我如何查询ghci呢?
我尝试解决的问题是第三版函数式编程的Haskell实践中的练习13.23。
How can you use the Haskell system to check whether two type expressions are unifiable, and if so what is their unification? Hint: you can make dummy definitions in Haskell in which the defined value, zircon say, is equated with itself:
zircon = zircon
Values defined like this can be declared to have any type you wish.
谢谢,
Sebastián。
:t [undefined :: Maybe a, undefined :: f (Bool, c)]
。 - max taldykin