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
Reported type error #8008
Comments
Comment author: administrator
Your problem is due to multiple redefinitions of types, since some
Have a look to http://pauillac.inria.fr/caml/FAQ/FAQ_EXPERT-eng.html The solution is to clear all the include directives into your files (* File main.ml *) (* End of file main.ml *) This completely clarifies the situation :) Then a new type error is reported: File "translation.ml", line 11, characters 17-34:
The value identifier Decimal_of_Binary is unbound. in effect: $ grep Decimal_of_Binary *.ml But this one is yours ... Even better, you could use modules that would be compiled separately and Hope this helps. Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/ |
Comment author: administrator FAQ (type redefinition). |
Original bug ID: 1536
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Dr Andrew A. Adams
Version: Caml Light 0.75/0.75
OS: RedHat Linux 7.3
Submission from: viwc1.rdg.ac.uk (134.225.16.91)
I have an application I'm developing to teach first year students. It involves
implementing types for Binary, Octal and Hexadecimal numbers and defining
conversions between them, integers and string representations of the Binary,
Octal and Hex numbers. When I cam to write the final part of this I wanted to
translate a list of string representations between two number systems leading to
the expression:
(map string_of_Octal (map Octal_of_Binary (map Binary_of_string strs)))
which leads to an error:
File "translation.ml", line 16, characters 8-33:
This expression has type Binary list,
but is used with type Binary list.
A gzipped tar file with all the code is available at:
http://www.personal.rdg.ac.uk/~sis00aaa/BODH.tgz
include "translation";;
will show the error.
The text was updated successfully, but these errors were encountered: