开发者

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

开发者 https://www.devze.com 2023-01-07 10:11 出处:网络
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

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

精彩评论

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