开发者

In GHC, is there a way to print the exports of module?

If I开发者_如何转开发 want to see what exports there are from Test.QuickCheck, for example, is there a command I can issue to GHCI to do this?


Yes, there is. Typing :browse Test.QuickCheck (or whatever module you want) will print all the exports:

Prelude> :browse Test.QuickCheck
(.&.) ::
  (Testable prop1, Testable prop2) => prop1 -> prop2 -> Property
(==>) :: (Testable prop) => Bool -> prop -> Property
(><) :: (Gen a -> Gen a) -> (Gen a -> Gen a) -> Gen a -> Gen a
class Arbitrary a where
  arbitrary :: Gen a
  shrink :: a -> [a]

... <snip> ...

vectorOf :: Int -> Gen a -> Gen [a]
whenFail :: (Testable prop) => IO () -> prop -> Property
whenFail' :: (Testable prop) => IO () -> prop -> Property
within :: (Testable prop) => Int -> prop -> Property

For a complete list of GHCi commands, check the documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜