* Bug with include and module types ?
@ 2009-03-10 10:48 Benedikt Grundmann
0 siblings, 0 replies; only message in thread
From: Benedikt Grundmann @ 2009-03-10 10:48 UTC (permalink / raw)
To: OCaml
Hi list,
I stumbled across something which I believe to be a bug in the ocaml
module type language:
Objective Caml version 3.11.0
# module type S = sig val foo : string -> string -> int val bar :
string -> string end;;
module type S =
sig val foo : string -> string -> int val bar : string -> string end
# module type B = sig include S val foo : string -> int end;;
module type B =
sig
val foo : string -> string -> int
val bar : string -> string
val foo : string -> int
end
#
Observe that if you do the same thing in the module language, the
behavior is different
(imho correct) and foo is shadowed:
# module S = struct let foo x y = 1 let bar s = s end ;;
module S : sig val foo : 'a -> 'b -> int val bar : 'a -> 'a end
# module B = struct include S let foo x = 1 end;;
module B : sig val bar : 'a -> 'a val foo : 'a -> int end
Cheers,
Bene
--
Calvin: I try to make everyone's day a little more
surreal.
(From Calvin & Hobbes)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-10 10:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 10:48 Bug with include and module types ? Benedikt Grundmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox