caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Rabea Ameur-Boulifa <Rabea.Ameur-Boulifa@telecom-paristech.fr>
To: caml-list@inria.fr
Subject: Help Utilisation de modules avec Ocamlyacc...
Date: Mon, 14 Jun 2010 17:32:16 +0200	[thread overview]
Message-ID: <4C164B80.2080202@telecom-paristech.fr> (raw)

Bonjour,

J'utilise la librairie ocamlgraph pour la génération d'automates 
(LTS)... Je vous explique mon problème qui n'est pas un problème de 
Ocamlgraph mais d'utilisation avec Ocamlyacc.


* J'ai créé un file *automate.ml* dans lequel je cree les modules:

module LTS_Vertex = struct... end

module LTS_Edge = struct... end

module LTS = Imperative.Digraph.AbstractLabeled(LTS_Vertex)(LTS_Edge)

module BUILD
  (LTS : Sig.I with type V.label = int and type E.label = string)
  (B : Builder.S with module G = LTS)
  = struct
let gEmpty = B.empty
...
end

module Build1 = BUILD(LTS)(Builder.I(LTS))


* J'ai cree un file Test.ml pour le test. Tout est OK!


*Le problème est l'utilisation  dans un parser.mly des fonctions et 
types déclarés dans les modules de automate.ml* Cad:

Je mets  dans la partie header: open Automate

Et dans la partie déclaration: %start task
                               %type < Graph.Builder.I(LTS).G.t> task
=> le type Graph.Builder.I(LTS).G.t est par exemple le type retourné par 
la fonction gEmpty du module BUILD...

J'écris donc une règle dont l'action fait appel a gEmpty... Mais


*La compilation donne ceci*
ocamlc -c  parser.mli
File "parser.mli", line 41, characters 48-72:
Unbound type constructor Graph.Builder.I(LTS).G.t



Merci par avance pour votre aide,
Cordialement,

Rabea Ameur


             reply	other threads:[~2010-06-14 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-14 15:32 Rabea Ameur-Boulifa [this message]
2010-06-14 16:52 ` [Caml-list] " Julien Signoles

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=4C164B80.2080202@telecom-paristech.fr \
    --to=rabea.ameur-boulifa@telecom-paristech.fr \
    --cc=caml-list@inria.fr \
    /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).