New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ocamlc infinite loop in signature matching #3611
Comments
Comment author: administrator Thanks for uncovering this subtle problem. Happy hacking!
|
Comment author: administrator Fixed by JG (2002-09-02) |
Comment author: administrator OCAML doesn't compile itself any more. From: Jacques Garrigue caml-bugs@pauillac.inria.fr
I did a "cvs update" and then "make clean" and then "make world", and make[2]: Nothing to be done for -- |
Comment author: administrator From: Jacques Garrigue garrigue@kurims.kyoto-u.ac.jp
Are you sure you committed the fix? I don't see changed behavior, and -- |
Comment author: administrator
I suppose I was lying about not having time, because I did the "make -- |
Comment author: administrator From: tim@fungible.com
Great!
And I added a loop simultaneoulsy. Fixed again. Thanks for your prompt report.
|
Comment author: administrator From: tim@fungible.com (Tim Freeman)
camlcvs is not the real source tree, but a copy of it. Index: typing/ctype.mlRCS file: /net/pauillac/caml/repository/csl/typing/ctype.ml,v
|
Original bug ID: 1360
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Tim Freeman
Version: 3.06
OS: Linux
Submission from: adsl-64-161-114-6.dsl.snfc21.pacbell.net (64.161.114.6)
Put this text in a file and pass it to ocamlc. It will run forever.
The loop doesn't happen if I don't say that the module Argdesc has signature
argdesc, so it looks like a loop in signature matching.
I have reproduced the problem with both ocaml 3.06 from Debian, and with
the CVS version, updated as of this morning.
module type Conscious = sig
type eventtype = [
SCALAR |
UNIT]type 'a eventid
class type formatter =
object
(* Next line is needed. *)
method format_eventid_tag: 'a . ([< eventtype] as 'a) eventid -> unit
end
class type ['a] eventdesc =
object
method dump: formatter -> unit
end
class type scalar_eventdesc =
object
inherit ['a] eventdesc
end
class type unit_eventdesc =
object
inherit ['a] eventdesc
end
class virtual ['a] eventdesc_impl:
object
method virtual dump: formatter -> unit
end
class virtual unit_eventdesc_impl:
object ('a)
inherit [[`UNIT]] eventdesc_impl
end
end
module type argdesc = sig
type 'a atom
val log_method: Conscious.unit_eventdesc atom -> unit
val log_new: Conscious.scalar_eventdesc atom -> unit
class function_argdesc: Conscious.unit_eventdesc
end
module Argdesc: argdesc = struct
module C = Conscious
type 'a atom
let log_new (atom: C.scalar_eventdesc atom): unit = ()
let log_method (atom: C.unit_eventdesc atom): unit = ()
class function_argdesc =
object (this)
inherit C.unit_eventdesc_impl
method dump (formatter:C.formatter): unit = ()
end
end
The text was updated successfully, but these errors were encountered: