caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ivan Gotovchits <ivg@ieee.org>
To: "Mr. Herr" <misterherr@freenet.de>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] undefined global Re_posix - ?
Date: Mon, 20 Jul 2015 16:09:28 -0400	[thread overview]
Message-ID: <CALdWJ+x0MuYQB74HttBFsVYzCjpRp0HHOOspXQvYRAWp47zfXA@mail.gmail.com> (raw)
In-Reply-To: <55AD534D.9040100@freenet.de>

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

You need to load posix sublibrary:

    #require "re.posix";;

On Mon, Jul 20, 2015 at 4:00 PM, Mr. Herr <misterherr@freenet.de> 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?
>
>

[-- Attachment #2: Type: text/html, Size: 2332 bytes --]

  reply	other threads:[~2015-07-20 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 20:00 Mr. Herr
2015-07-20 20:09 ` Ivan Gotovchits [this message]
2015-07-20 22:37   ` Mr. Herr
2015-07-20 23:09     ` Daniel Bünzli
2015-07-20 20:13 ` Jeremy Yallop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALdWJ+x0MuYQB74HttBFsVYzCjpRp0HHOOspXQvYRAWp47zfXA@mail.gmail.com \
    --to=ivg@ieee.org \
    --cc=caml-list@inria.fr \
    --cc=misterherr@freenet.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).