# How to get all functions in a package?

**URL:** <https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286>\
**Category:** Learn\
**Created:** [June 12, 2020, 3:54am UTC](https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286 "2020-06-12T03:54:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![notooth](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@notooth](https://discourse.haskell.org/u/notooth)\
**Post date:** [June 12, 2020, 3:54am UTC](https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286/1 "2020-06-12T03:54:40Z")

</div>

Hello everyone,

I want to get all functions in a package (like Prelude) and print them out on the screen. Is that possible?

---

<div class="post-metadata">

**Author:** ![f-a](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/f-a/32/2740_2.png) [@f-a](https://discourse.haskell.org/u/f-a)\
**Post date:** [June 12, 2020, 4:30am UTC](https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286/2 "2020-06-12T04:30:39Z")

</div>

Hello notooth, maybe what you are looking for is `:browse` in ghci?

```
> :browse Prelude
(!!) :: [a] -> Int -> a
($) :: (a -> b) -> a -> b
($!) :: (a -> b) -> a -> b
(&&) :: Bool -> Bool -> Bool
(++) :: [a] -> [a] -> [a]
⋮
```

---

<div class="post-metadata">

**Author:** ![notooth](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@notooth](https://discourse.haskell.org/u/notooth)\
**Post date:** [June 12, 2020, 7:17am UTC](https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286/3 "2020-06-12T07:17:07Z")

</div>

How can I do that in Haskell code? I want to get the functions and use them at run-time too.

---

<div class="post-metadata">

**Author:** ![jaror](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/jaror/32/3271_2.png) [@jaror](https://discourse.haskell.org/u/jaror)\
**Post date:** [June 12, 2020, 9:48am UTC](https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286/4 "2020-06-12T09:48:55Z")

</div>

The [`hint`](http://hackage.haskell.org/package/hint) package can do this, but it won’t be very pretty. It depends on GHC itself, so it is a pretty heavyweight solution. There is an example on the linked page which includes a function that gets all functions from a module.

---

<div class="post-metadata">

**Author:** ![notooth](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@notooth](https://discourse.haskell.org/u/notooth)\
**Post date:** [June 12, 2020, 5:35pm UTC](https://discourse.haskell.org/t/how-to-get-all-functions-in-a-package/1286/5 "2020-06-12T17:35:47Z")

</div>

Thank you. I will take a look.
