From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id AB2A3BBAF for ; Mon, 14 Jun 2010 17:32:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhoBAJDoFUzBN3HVmWdsb2JhbACSZ4wuAQEBAQEICwoHESLASIUaBA X-IronPort-AV: E=Sophos;i="4.53,414,1272837600"; d="scan'208";a="53097621" Received: from smtp3.eurecom.fr (HELO smtp2.eurecom.fr) ([193.55.113.213]) by mail2-smtp-roc.national.inria.fr with ESMTP; 14 Jun 2010 17:32:16 +0200 X-IronPort-AV: E=Sophos;i="4.53,414,1272837600"; d="scan'208";a="792984" Received: from monza.eurecom.fr ([192.168.106.15]) by drago2i.eurecom.fr with ESMTP; 14 Jun 2010 17:32:16 +0200 Received: from [172.18.20.13] (fronsac.eurecom.fr [172.18.20.13]) by monza.eurecom.fr (Postfix) with ESMTP id 607A0178C for ; Mon, 14 Jun 2010 17:32:16 +0200 (MEST) Message-ID: <4C164B80.2080202@telecom-paristech.fr> Date: Mon, 14 Jun 2010 17:32:16 +0200 From: Rabea Ameur-Boulifa User-Agent: Thunderbird 2.0.0.21 (X11/20090302) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Help Utilisation de modules avec Ocamlyacc... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ocamlyacc:01 d'automates:01 ocamlyacc:01 struct:01 struct:01 sig:01 parser:01 compilation:01 ocamlc:01 parser:01 mli:01 mli:01 unbound:01 graph:01 graph:01 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