aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/extraction/haskell.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-04-16 23:27:41 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-04-16 23:27:41 +0000
commit4478577ca03d71742f954783d57b015f8d87f031 (patch)
treef5ecb4d6bd6a35214d2b6a40255a439eb305e0c8 /contrib/extraction/haskell.ml
parentd9a63c724960c2af66d4942bec2041846e584697 (diff)
BIG MAJ Extraction:
------------------ - (Recursive) Extraction Module devient (Recursive) Extraction Library (pour cause d'ambiguite avec les nouveaux modules Coq). - un nouveau Extraction Module qui extrait dans le toplevel tout module Coq - tout fixpoint est de nouveau inlinable (Yves). - fix bug du calcul d'env minimal des modules en extraction monolithique. - un nouveau fichier Modutil regroupant manques de Modops & functions specifiques aux modules MiniML - plus d'aliases a trainer (mais des substitutions des le depart) - ET SURTOUT: un nommage correct (ou du moins moins pire) dans les modtypes et les functors. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3934 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/extraction/haskell.ml')
-rw-r--r--contrib/extraction/haskell.ml14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/extraction/haskell.ml b/contrib/extraction/haskell.ml
index 7092efad5..15101037b 100644
--- a/contrib/extraction/haskell.ml
+++ b/contrib/extraction/haskell.ml
@@ -59,9 +59,9 @@ let pr_lower_id id = pr_id (lowercase_id id)
module Make = functor(P : Mlpp_param) -> struct
-let local_mp = ref initial_path
+let local_mpl = ref ([] : module_path list)
-let pp_global r = P.pp_global !local_mp r
+let pp_global r = P.pp_global !local_mpl r
let empty_env () = [], P.globals()
(*s Pretty-printing of types. [par] is a boolean indicating whether parentheses
@@ -237,8 +237,8 @@ let rec pp_ind first kn i ind =
(*s Pretty-printing of a declaration. *)
-let pp_decl mp =
- local_mp := mp;
+let pp_decl mpl =
+ local_mpl := mpl;
function
| Dind (kn,i) when i.ind_info = Singleton ->
pp_singleton kn i.ind_packets.(0) ++ fnl ()
@@ -262,15 +262,15 @@ let pp_decl mp =
else
hov 0 (pp_function (empty_env ()) (pp_global r) a ++ fnl () ++ fnl ())
-let pp_structure_elem mp = function
- | (l,SEdecl d) -> pp_decl mp d
+let pp_structure_elem mpl = function
+ | (l,SEdecl d) -> pp_decl mpl d
| (l,SEmodule m) ->
failwith "TODO: Haskell extraction of modules not implemented yet"
| (l,SEmodtype m) ->
failwith "TODO: Haskell extraction of modules not implemented yet"
let pp_struct =
- prlist (fun (mp,sel) -> prlist (pp_structure_elem mp) sel)
+ prlist (fun (mp,sel) -> prlist (pp_structure_elem [mp]) sel)
let pp_signature s = failwith "TODO"