You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3700 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Brian Hulley
Version: 3.08.2
OS: Windows XP SP2
Submission from: dsl-80-44-75-116.access.as9105.com (80.44.75.116)
I have got two files, stringsource.ml and stringsource.mli (all lowercase).
However the compiler keeps complaining that:
"Wrong file naming: stringSource.cmi contains the compiled interface for
Stringsource"
In this message, the compiler has got the cases completely mixed up, because I
used "StringSource" as the module name and the files are stored on disk with all
lower case characters, so I can't figure out where the compiler is getting
"stringSource" from. I've tried everything: deleting the files from disk,
changing the name of the module from "StringSource" to "Stringsource" etc, but
nothing seems to work.
A bug report 2027 seems related, but that is marked as fixed (although the
report was related to Mac OS I think) Also there was a question on this issue on
a Yahoo group, but someone replied that it was fixed, but I assume this fix must
have been for a different operating system since it is certainly not fixed on
Windows XP.
I am compiling via:
ocamake *.mli *.ml
and the contents of the files are:
stringsource.mli:
module type STRINGSOURCE = sig
val getSource : string -> (int -> char option)
end;;
stringsource.ml:
module Stringsource:STRINGSOURCE = struct
let getSource (s:string) =
let len = String.length s in
function i ->
if (i < len) then Some s.[i] else None
end;;
Many thanks - I look forward to trying out this new language.
The text was updated successfully, but these errors were encountered:
I have got two files, stringsource.ml and stringsource.mli (all lowercase).
However the compiler keeps complaining that:
"Wrong file naming: stringSource.cmi contains the compiled interface for
Stringsource"
That means somewhere in your source you are using StringSource as
the name of the module that corresponds to your two files. You cannot
do that. The name of the module must be the same as the file names,
with an uppercase initial. Hence: Stringsource.
In this message, the compiler has got the cases completely mixed up, because
I
used "StringSource" as the module name and the files are stored on disk with
all
lower case characters, so I can't figure out where the compiler is getting
"stringSource" from.
It gets it by lowercasing the initial of the module name.
stringsource.mli:
module type STRINGSOURCE = sig
val getSource : string -> (int -> char option)
end;;
stringsource.ml:
module Stringsource:STRINGSOURCE = struct
let getSource (s:string) =
let len = String.length s in
function i ->
if (i < len) then Some s.[i] else None
end;;
As given, your files trigger this error, as expected:
File "stringsource.ml", line 1, characters 20-32:
Unbound module type STRINGSOURCE
Since stringsource.mli declares a module type named STRINGSOURCE,
you must define this module type in stringsource.ml (in this case,
by copying the definition from stringsource.mli).
Original bug ID: 3700
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Brian Hulley
Version: 3.08.2
OS: Windows XP SP2
Submission from: dsl-80-44-75-116.access.as9105.com (80.44.75.116)
I have got two files, stringsource.ml and stringsource.mli (all lowercase).
However the compiler keeps complaining that:
"Wrong file naming: stringSource.cmi contains the compiled interface for
Stringsource"
In this message, the compiler has got the cases completely mixed up, because I
used "StringSource" as the module name and the files are stored on disk with all
lower case characters, so I can't figure out where the compiler is getting
"stringSource" from. I've tried everything: deleting the files from disk,
changing the name of the module from "StringSource" to "Stringsource" etc, but
nothing seems to work.
A bug report 2027 seems related, but that is marked as fixed (although the
report was related to Mac OS I think) Also there was a question on this issue on
a Yahoo group, but someone replied that it was fixed, but I assume this fix must
have been for a different operating system since it is certainly not fixed on
Windows XP.
I am compiling via:
ocamake *.mli *.ml
and the contents of the files are:
stringsource.mli:
module type STRINGSOURCE = sig
val getSource : string -> (int -> char option)
end;;
stringsource.ml:
module Stringsource:STRINGSOURCE = struct
let getSource (s:string) =
let len = String.length s in
function i ->
if (i < len) then Some s.[i] else None
end;;
Many thanks - I look forward to trying out this new language.
The text was updated successfully, but these errors were encountered: