Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

haskell

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?

like image 695
qrest Avatar asked Jul 14 '10 07:07

qrest


1 Answers

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.

like image 74
Antal Spector-Zabusky Avatar answered Sep 21 '22 13:09

Antal Spector-Zabusky