tags:

views:

62

answers:

1

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?

+11  A: 

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.

Antal S-Z