On 20.07.2015 22:09, Ivan Gotovchits wrote: > You need to load posix sublibrary: > > #require "re.posix";; > > On Mon, Jul 20, 2015 at 4:00 PM, Mr. Herr > wrote: > > Hi, > > unexplainable behavior: module Re_posix causes an error "undefined global > Re_posix", > but the module is known. > > Even stranger: when misspelling Re_posix the toplevel proposes Re_posix. > > What is wrong? > > /Str. > > ---------------------------------------------------------------------------------- > /opt/opam/4.02.2/lib/ocaml/unix.cma: loaded > # #require "re";; > /opt/opam/4.02.2/lib/bytes: added to search path > /opt/opam/4.02.2/lib/re: added to search path > /opt/opam/4.02.2/lib/re/re.cma: loaded > # let re_whitespace = Re_posix.compile_pat "[\t ]+" ;; > Error: Reference to undefined global `Re_posix' > # #show_module Re_posix;; > module Re_posix : > sig > exception Parse_error > exception Not_supported > type opt = [ `ICase | `Newline | `NoSub ] > val re : ?opts:opt list -> string -> Re.t > val compile : Re.t -> Re.re > val compile_pat : ?opts:opt list -> string -> Re.re > end > # let re_whitespace = Re_posixx.compile_pat "[\t ]+" ;; > Error: Unbound module Re_posixx > Hint: Did you mean Re_posix? > > Okay, thank you all - five answers in the mailbox. So there is not much to "/opt/opam/4.02.2/lib/re: added to search path" /Str.