# Loading Modules into GHCi

Before we move on, let's see how we can load modules we create into GHCi, so that we can use any functions we define. We create a new file, e.g. `Practice.hs`, and define our module in there (remember, the module name should match the file name), and define our `triple` function from before:

```haskell
module Practice where

triple x = 3 * x
```

We can now launch GHCi from the terminal and load our module using its relative file path using `:load`, making the function available for use:

```haskell
$ ghci
GHCi, version 8.10.2: https://www.haskell.org/ghc/ :? for help

{- Assuming our Practice.hs file is in the same directory from 
 which we launched GHCi -}
 
ghci> :load Practice.hs
[1 of 1] Compiling Practice ( Practice.hs, interpreted )
Ok, one module loaded.

*Practice> triple 3
9
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://haskell.hpmeducation.com/introduction/loading-modules-into-ghci.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
