Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
can anyone replicate this camlp4 problem?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-25 (19:56)
From: Peng Zang <peng.zang@g...>
Subject: can anyone replicate this camlp4 problem?
Hash: SHA1

Hi, camlp4 seems to break parsing of object duplication on 3.11.  Can anyone 
replicate this problem?  Is this an known issue?  A quick google search did 
not reveal anything..


          Objective Caml version 3.11.0

  # #use "topfind";;
  Findlib has been successfully loaded. Additional directives:
    #require "package";;      to load a package
    #list;;                   to list the available packages
    #camlp4o;;                to load camlp4 (standard syntax)
    #camlp4r;;                to load camlp4 (revised syntax)
    #predicates "p,q,...";;   to set these predicates
    Topfind.reset();;         to force that packages will be reloaded
    #thread;;                 to enable threads

  # #camlp4o;;
  /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/dynlink.cma: loaded
  /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4: added to search path
  /home/peng/app-data/godi-3.11/lib/ocaml/std-lib/camlp4/camlp4o.cma: loaded
          Camlp4 Parsing version 3.11.0

  # class functional_point x y = object 
      val x = x
      val y = y
      method get_x = x
      method get_y = y
      method move dx dy = {< x = x + dx; y = y + dy >}
            Characters 138-144:
      method move dx dy = {< x = x + dx; y = y + dy >}
  Warning S: this expression should have type unit.
  Characters 146-156:
      method move dx dy = {< x = x + dx; y = y + dy >}
  Error: This expression has type bool but is here used with type int
Version: GnuPG v2.0.7 (GNU/Linux)