Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Why is my own (implicit) module unbound?

$
0
0

@puitgfr wrote:

Hello,

There’s something I don’t understand with (implicit) modules, compilation (dune), cma and the toplevel.
In Lib/i201.ml, I’ve put this simple type definition:

type nombre = E of int
            | R of float
            | C of float*float

Then, thanks to this dune file:

(library
  (public_name inf201)
  (name        i201)

I can build my library inf201 successfully.
In the Lib/_build/default directory, I try to load it in a toplevel:

default § ocaml i201.cma 
        OCaml version 4.06.1

Findlib has been successfully loaded.../...

# I201.E 1 ;;
Error: Unbound module I201

Same problem with #load:

default § ocaml
        OCaml version 4.06.1

Findlib has been successfully loaded.../...

# #load "i201.cma" ;;
# I201.E 1 ;;
Error: Unbound module I201

I guess there’s something obvious I’ve missed.

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles