:browse will provide you with most of this information. He shows
- Type signatures for functions and operators.
- Classes and their methods.
- Data types, new types, and type synonyms with constructors if they are in scope.
Without any arguments, it displays this information for the module currently loaded. You can also specify a different module.
Prelude> :browse Control.Applicative class (Functor f) => Applicative f where pure :: a -> fa (<*>) :: f (a -> b) -> fa -> fb (*>) :: fa -> fb -> fb (<*) :: fa -> fb -> fa ...
To find out details, including priority and associativity for statements, as well as instances for a data type, use :info .
Prelude> :info (^) (^) :: (Num a, Integral b) => a -> b -> a -- Defined in GHC.Real infixr 8 ^ Prelude> :info Bool data Bool = False | True -- Defined in GHC.Bool instance Bounded Bool -- Defined in GHC.Enum instance Enum Bool -- Defined in GHC.Enum instance Eq Bool -- Defined in GHC.Base instance Ord Bool -- Defined in GHC.Base instance Read Bool -- Defined in GHC.Read
These commands are also available during debugging.
For more information, type :help or see the GHCi chapter of the GHC User Guide .
source share