I'm using Haskell 2010.1.0.0.1 with GHC 6. Typing :t
at the GHCi prompt followed by the name of a function shows us the type of the function. Is there a way to view the function definition as well?
相关问题
- Understanding do notation for simple Reader monad:
- Making Custom Instances of PersistBackend
- Haskell: What is the differrence between `Num [a]
- applying a list to an entered function to check fo
- Haskell split a list into two by a pivot value
相关文章
- Is it possible to write pattern-matched functions
- Haskell underscore vs. explicit variable
- Top-level expression evaluation at compile time
- Stuck in the State Monad
- foldr vs foldr1 usage in Haskell
- List of checkboxes with digestive-functors
- How does this list comprehension over the inits of
- Replacing => in place of -> in function type signa
Nope, can't do that. Some fun things you, the Haskell beginner, can do:
:browse
to find all of the definitions exported by a module:help
for the obvious resultNot currently.
The closest command to what you want is
:info
like so:
You can though, see the source for identifiers generated by the haddock tool, on Hackage.
Note that "?src" is a valid command in lambdabot, on the #haskell IRC channel, and does what you'd expect.
I don't think so. You can use
:i
for a little bit more information (more useful for infix operators and data constructions, etc.), but not the definition:You can use hoogle to quickly find the documentation for a standard library function, which on the right has a link to go to the source. It's still a few clicks away though.