caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Help Utilisation de modules avec Ocamlyacc...
@ 2010-06-14 15:32 Rabea Ameur-Boulifa
  2010-06-14 16:52 ` [Caml-list] " Julien Signoles
  0 siblings, 1 reply; 2+ messages in thread
From: Rabea Ameur-Boulifa @ 2010-06-14 15:32 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Help Utilisation de modules avec Ocamlyacc...
  2010-06-14 15:32 Help Utilisation de modules avec Ocamlyacc Rabea Ameur-Boulifa
@ 2010-06-14 16:52 ` Julien Signoles
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Signoles @ 2010-06-14 16:52 UTC (permalink / raw)
  To: Rabea Ameur-Boulifa; +Cc: caml-list

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

Hello,

For caml-list readers who do not speak French, the initial question is about
the compilation of an ocamlyacc parser which uses the OcamlGraph library.

Le 14 juin 2010 17:32, Rabea Ameur-Boulifa <
Rabea.Ameur-Boulifa@telecom-paristech.fr> a écrit :

> 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.
>
> *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
>

I don't know which build system (make, ocamlbuild, OcamlMakefile, etc)  you
are using but you must add the directory where OcamlGraph is installed to
the list of directories searched for compiled files:

ocamlc -c -I +ocamlgraph parser.mli

The above line assumes a standard OcamlGraph installation.

Hope this helps,
Julien

PS: this kind of question should be posted on the beginner's list (
http://tech.groups.yahoo.com/group/ocaml_beginners)

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-14 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-14 15:32 Help Utilisation de modules avec Ocamlyacc Rabea Ameur-Boulifa
2010-06-14 16:52 ` [Caml-list] " Julien Signoles

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).