# Using Modules (15 characters long now)

**URL:** <https://discuss.ocaml.org/t/using-modules-15-characters-long-now/13630>\
**Category:** Learning\
**Created:** [December 14, 2023, 1:13am UTC](https://discuss.ocaml.org/t/using-modules-15-characters-long-now/13630 "2023-12-14T01:13:42Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![cuihtlauac](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/cuihtlauac/32/3638_2.png) [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Post date:** [December 14, 2023, 9:43am UTC](https://discuss.ocaml.org/t/using-modules-15-characters-long-now/13630/4 "2023-12-14T09:43:14Z")

</div>

In the tutorial setup `lib/dune` contains:

```lisp
(library
 (name hello))

```

From that, there are two options:

1. With a `lib/hello.ml` file, as you found
2. Without a `lib/hello.ml` file, as described by @yawaramin.

However, you can expose other modules from the `lib` folder (your `mymodule.ml`) even in case 1. You need a `hello.ml` file looking like this:

```ocaml
module Mymodule = Mymodule
let text = "hi"

```

You’ll be able to use: `Hello.Mymodule.f` and `Hello.text`. If you write `module Foo = Mymodule`, then `Hello.Mymodule.f` becomes available as `Hello.Foo.f`

---

_[View the full topic](https://discuss.ocaml.org/t/using-modules-15-characters-long-now/13630)._
