Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sources initiaux de l'INRIA. version du 03-10-2012

F. Boisson 03/10/2012
  • Loading branch information...
commit a245466097e3eb5e1d62849416f37cc2605f3305 1 parent 2b2d5bb
@FBoisson FBoisson authored
Showing with 29,579 additions and 0 deletions.
  1. +447 −0 CHANGES
  2. +21 −0 COPYRIGHT
  3. +207 −0 INSTALL
  4. +9 −0 KNOWN-BUGS
  5. +618 −0 LICENSE
  6. +68 −0 PORTING
  7. +31 −0 READ.md
  8. +144 −0 README
  9. +2 −0  config/.cvsignore
  10. +6 −0 config/Makefile
  11. +2 −0  config/auto-aux/.cvsignore
  12. +95 −0 config/auto-aux/align.c
  13. +45 −0 config/auto-aux/async_io.c
  14. +21 −0 config/auto-aux/bytecopy.c
  15. +38 −0 config/auto-aux/dblalign.c
  16. +25 −0 config/auto-aux/endian.c
  17. +17 −0 config/auto-aux/getgroups.c
  18. +5 −0 config/auto-aux/hasgot
  19. +3 −0  config/auto-aux/runtest
  20. +8 −0 config/auto-aux/schar.c
  21. +7 −0 config/auto-aux/schar2.c
  22. +8 −0 config/auto-aux/sighandler.c
  23. +58 −0 config/auto-aux/signals.c
  24. +9 −0 config/auto-aux/sizes.c
  25. +310 −0 config/autoconf
  26. +32 −0 config/m-templ.h
  27. +147 −0 config/s-templ.h
  28. +89 −0 contrib/INDEX
  29. +307 −0 contrib/Makefile
  30. +11 −0 contrib/caml-latex2e/INSTALL
  31. +41 −0 contrib/caml-latex2e/Makefile
  32. +43 −0 contrib/caml-latex2e/README
  33. +130 −0 contrib/caml-latex2e/caml-tex
  34. +435 −0 contrib/caml-latex2e/caml.dtx
  35. +21 −0 contrib/caml-latex2e/caml.ins
  36. +51 −0 contrib/caml-latex2e/example.mlt
  37. +18 −0 contrib/caml-tex/Makefile
  38. +13 −0 contrib/caml-tex/README
  39. +37 −0 contrib/caml-tex/caml-sl.sty
  40. +122 −0 contrib/caml-tex/caml-tex
  41. +89 −0 contrib/caml-tex/caml-tex.1
  42. +131 −0 contrib/caml-tex/caml-tex.doc
  43. +31 −0 contrib/caml-tex/caml.sty
  44. +4 −0 contrib/camlmode/LCD-entry
  45. +18 −0 contrib/camlmode/Makefile
  46. +178 −0 contrib/camlmode/README
  47. +31 −0 contrib/camlmode/caml-compat.el
  48. +1,190 −0 contrib/camlmode/caml.el
  49. +748 −0 contrib/camlmode/camldebug.el
  50. +6 −0 contrib/camlmode/compile
  51. +6 −0 contrib/camlmode/dotemacs
  52. +106 −0 contrib/camlmode/inf-caml.el
  53. +9 −0 contrib/camlsearch/MANIFEST
  54. +35 −0 contrib/camlsearch/Makefile
  55. +172 −0 contrib/camlsearch/README
  56. +2 −0  contrib/camlsearch/doc/Makefile
  57. +194 −0 contrib/camlsearch/doc/camlsearch.l
  58. +3 −0  contrib/camlsearch/emacs-lisp/Makefile
  59. +2 −0  contrib/camlsearch/emacs-lisp/README
  60. +435 −0 contrib/camlsearch/emacs-lisp/caml-search.el
  61. +1 −0  contrib/camlsearch/source/.cvsignore
  62. +81 −0 contrib/camlsearch/source/Equal.ml
  63. +5 −0 contrib/camlsearch/source/Equal.mli
  64. +118 −0 contrib/camlsearch/source/LC_unify.ml
  65. +10 −0 contrib/camlsearch/source/LC_unify.mli
  66. +141 −0 contrib/camlsearch/source/Makefile
  67. +114 −0 contrib/camlsearch/source/TypeRewrite.ml
  68. +4 −0 contrib/camlsearch/source/TypeRewrite.mli
  69. +140 −0 contrib/camlsearch/source/camlsearch.ml
  70. +1 −0  contrib/camlsearch/source/camlsearch.mli
  71. +91 −0 contrib/camlsearch/source/command_line.ml
  72. +11 −0 contrib/camlsearch/source/command_line.mli
  73. +28 −0 contrib/camlsearch/source/comparisons.ml
  74. +12 −0 contrib/camlsearch/source/comparisons.mli
  75. +61 −0 contrib/camlsearch/source/compiler_dependant_stuff.ml
  76. +4 −0 contrib/camlsearch/source/compiler_dependant_stuff.mli
  77. +17 −0 contrib/camlsearch/source/directory_and_file.ml
  78. +6 −0 contrib/camlsearch/source/directory_and_file.mli
  79. +10 −0 contrib/camlsearch/source/external_type.mli
  80. +27 −0 contrib/camlsearch/source/external_type.mli.tex
  81. +17 −0 contrib/camlsearch/source/general.ml
  82. +8 −0 contrib/camlsearch/source/general.mli
  83. +356 −0 contrib/camlsearch/source/matching.ml
  84. +9 −0 contrib/camlsearch/source/matching.mli
  85. +197 −0 contrib/camlsearch/source/matching_on_bases.ml
  86. +7 −0 contrib/camlsearch/source/matching_on_bases.mli
  87. +58 −0 contrib/camlsearch/source/myTypes.ml
  88. +168 −0 contrib/camlsearch/source/normalization.ml
  89. +18 −0 contrib/camlsearch/source/normalization.mli
  90. +261 −0 contrib/camlsearch/source/operations_on_types.ml
  91. +110 −0 contrib/camlsearch/source/operations_on_types.mli
  92. +69 −0 contrib/camlsearch/source/output.ml
  93. +16 −0 contrib/camlsearch/source/output.mli
  94. +50 −0 contrib/camlsearch/source/primitives.ml
  95. +20 −0 contrib/camlsearch/source/primitives.mli
  96. +7 −0 contrib/camlsearch/source/type_for_matching.ml
  97. +37 −0 contrib/camlsearch/source/type_for_matching.mli
  98. +87 −0 contrib/camlsearch/source/type_for_matching.mli.tex
  99. +30 −0 contrib/camlsearch/source/type_lexer.mll
  100. +138 −0 contrib/camlsearch/source/type_parser.mly
  101. +37 −0 contrib/camlsearch/tools/caml-tex-extract
  102. +50 −0 contrib/camlsearch/tools/caml-tex-format
  103. +98 −0 contrib/camltk/ChangeLog
  104. +18 −0 contrib/camltk/INSTALL
  105. +23 −0 contrib/camltk/KnownBugs
  106. +56 −0 contrib/camltk/Makefile
  107. +55 −0 contrib/camltk/README
  108. +1,150 −0 contrib/camltk/Widgets.src
  109. +4 −0 contrib/camltk/books-examples/Makefile
  110. +24 −0 contrib/camltk/books-examples/include.ml
  111. +22 −0 contrib/camltk/books-examples/ouster-f16.1.ml
  112. +41 −0 contrib/camltk/books-examples/ouster-f16.10.ml
  113. +23 −0 contrib/camltk/books-examples/ouster-f16.11.ml
  114. +27 −0 contrib/camltk/books-examples/ouster-f16.12.ml
  115. +12 −0 contrib/camltk/books-examples/ouster-f16.13.ml
  116. +28 −0 contrib/camltk/books-examples/ouster-f16.14.ml
  117. +44 −0 contrib/camltk/books-examples/ouster-f16.15.ml
  118. +10 −0 contrib/camltk/books-examples/ouster-f16.2.ml
  119. +18 −0 contrib/camltk/books-examples/ouster-f16.3.ml
  120. +13 −0 contrib/camltk/books-examples/ouster-f16.6.ml
  121. +12 −0 contrib/camltk/books-examples/ouster-f16.7.ml
  122. +16 −0 contrib/camltk/books-examples/ouster-f16.8.ml
  123. +15 −0 contrib/camltk/books-examples/ouster-f16.9.ml
  124. +23 −0 contrib/camltk/books-examples/ouster-f17.3.ml
  125. +31 −0 contrib/camltk/books-examples/ouster-f17.4.ml
  126. +10 −0 contrib/camltk/books-examples/ouster-f17.5.ml
  127. +45 −0 contrib/camltk/books-examples/ouster-f2.2.ml
  128. +27 −0 contrib/camltk/books-examples/ouster-f2.3.ml
  129. +18 −0 contrib/camltk/books-examples/ouster-s2.3.ml
  130. +14 −0 contrib/camltk/books-examples/ouster-s2.7.ml
  131. +93 −0 contrib/camltk/browser/Makefile
  132. +185 −0 contrib/camltk/browser/camlbrowser.man
  133. +45 −0 contrib/camltk/browser/complete.ml
  134. +388 −0 contrib/camltk/browser/hyper_printers.ml
  135. +262 −0 contrib/camltk/browser/lexer.mlp
  136. +260 −0 contrib/camltk/browser/main.mlp
  137. +53 −0 contrib/camltk/browser/modlist.ml
  138. +35 −0 contrib/camltk/browser/source.ml
  139. +89 −0 contrib/camltk/browser/tags.ml
  140. +254 −0 contrib/camltk/browser/util.ml
  141. +320 −0 contrib/camltk/browser/visual.ml
  142. +51 −0 contrib/camltk/compiler/Makefile
  143. +447 −0 contrib/camltk/compiler/compile.ml
  144. +32 −0 contrib/camltk/compiler/intf.ml
  145. +138 −0 contrib/camltk/compiler/lexer.mll
  146. +183 −0 contrib/camltk/compiler/maincompile.ml
  147. +210 −0 contrib/camltk/compiler/parser.mly
  148. +337 −0 contrib/camltk/compiler/tables.ml
  149. +73 −0 contrib/camltk/compiler/tsort.ml
  150. +131 −0 contrib/camltk/lib/Makefile
  151. +57 −0 contrib/camltk/lib/modules
  152. +67 −0 contrib/camltk/libsupport/Makefile
  153. +18 −0 contrib/camltk/libsupport/builtin_GetBitmap.ml
  154. +45 −0 contrib/camltk/libsupport/builtin_GetCursor.ml
  155. +27 −0 contrib/camltk/libsupport/builtin_GetPixel.ml
  156. +373 −0 contrib/camltk/libsupport/builtin_bind.ml
  157. +68 −0 contrib/camltk/libsupport/builtin_index.ml
  158. +18 −0 contrib/camltk/libsupport/builtin_menu.ml
  159. +122 −0 contrib/camltk/libsupport/builtin_text.ml
  160. +20 −0 contrib/camltk/libsupport/builtina_canvas.ml
  161. 0  contrib/camltk/libsupport/builtina_empty.ml
  162. +401 −0 contrib/camltk/libsupport/camltk.c
  163. +19 −0 contrib/camltk/libsupport/camltk.mli
  164. +52 −0 contrib/camltk/libsupport/mainloop.ml
  165. +144 −0 contrib/camltk/libsupport/protocol.ml
  166. +54 −0 contrib/camltk/libsupport/protocol.mli
  167. +16 −0 contrib/camltk/libsupport/report.ml
  168. +291 −0 contrib/camltk/libsupport/support.ml
  169. +91 −0 contrib/camltk/libsupport/support.mli
  170. +24 −0 contrib/camltk/libsupport/textvariable.ml
  171. +20 −0 contrib/camltk/libsupport/textvariable.mli
  172. +92 −0 contrib/camltk/test/Makefile
  173. +38 −0 contrib/camltk/test/addition.ml
  174. +49 −0 contrib/camltk/test/bindtest.ml
  175. +19 −0 contrib/camltk/test/buttons.ml
  176. +51 −0 contrib/camltk/test/calc.ml
  177. +35 −0 contrib/camltk/test/canvastest.ml
  178. +13 −0 contrib/camltk/test/entryparams.ml
  179. +16 −0 contrib/camltk/test/helloworld.ml
  180. +35 −0 contrib/camltk/test/lbox.ml
  181. +13 −0 contrib/camltk/test/menutest.ml
  182. +21 −0 contrib/camltk/test/text1.ml
  183. +22 −0 contrib/camltk/test/text2.ml
  184. +20 −0 contrib/camltk/test/tkmesbox.ml
  185. +78 −0 contrib/camltk4/Makefile
  186. +1,717 −0 contrib/camltk4/Widgets.src
  187. +4 −0 contrib/camltk4/browser/.cvsignore
  188. +3 −0  contrib/camltk4/browser/.depend
  189. +83 −0 contrib/camltk4/browser/Makefile
  190. +185 −0 contrib/camltk4/browser/camlbrowser.man
  191. +388 −0 contrib/camltk4/browser/hyper_printers.ml
  192. +262 −0 contrib/camltk4/browser/lexer.mlp
  193. +247 −0 contrib/camltk4/browser/main.mlp
  194. +53 −0 contrib/camltk4/browser/modlist.ml
  195. +35 −0 contrib/camltk4/browser/source.ml
  196. +89 −0 contrib/camltk4/browser/tags.ml
  197. +300 −0 contrib/camltk4/browser/visual.ml
  198. +5 −0 contrib/camltk4/compiler/.cvsignore
  199. +51 −0 contrib/camltk4/compiler/Makefile
  200. +501 −0 contrib/camltk4/compiler/compile.ml
  201. +54 −0 contrib/camltk4/compiler/intf.ml
  202. +140 −0 contrib/camltk4/compiler/lexer.mll
  203. +239 −0 contrib/camltk4/compiler/maincompile.ml
  204. +30 −0 contrib/camltk4/compiler/parser.mli
  205. +240 −0 contrib/camltk4/compiler/parser.mly
  206. +402 −0 contrib/camltk4/compiler/tables.ml
  207. +74 −0 contrib/camltk4/compiler/tsort.ml
  208. +13 −0 contrib/camltk4/frx/.depend
  209. +35 −0 contrib/camltk4/frx/Makefile
  210. +11 −0 contrib/camltk4/frx/frx_after.ml
  211. +52 −0 contrib/camltk4/frx/frx_ctext.ml
  212. +99 −0 contrib/camltk4/frx/frx_dialog.ml
  213. +29 −0 contrib/camltk4/frx/frx_entry.ml
  214. +52 −0 contrib/camltk4/frx/frx_fillbox.ml
  215. +55 −0 contrib/camltk4/frx/frx_fit.ml
  216. +1 −0  contrib/camltk4/frx/frx_fit.mli
  217. +12 −0 contrib/camltk4/frx/frx_focus.ml
  218. +37 −0 contrib/camltk4/frx/frx_font.ml
  219. +2 −0  contrib/camltk4/frx/frx_font.mli
  220. +36 −0 contrib/camltk4/frx/frx_lbutton.ml
  221. +11 −0 contrib/camltk4/frx/frx_lbutton.mli
  222. +79 −0 contrib/camltk4/frx/frx_listbox.ml
  223. +75 −0 contrib/camltk4/frx/frx_mem.ml
  224. +27 −0 contrib/camltk4/frx/frx_misc.ml
  225. +185 −0 contrib/camltk4/frx/frx_req.ml
  226. +41 −0 contrib/camltk4/frx/frx_rpc.ml
  227. +14 −0 contrib/camltk4/frx/frx_rpc.mli
  228. +33 −0 contrib/camltk4/frx/frx_selection.ml
  229. +1 −0  contrib/camltk4/frx/frx_selection.mli
  230. +75 −0 contrib/camltk4/frx/frx_synth.ml
  231. +6 −0 contrib/camltk4/frx/frx_synth.mli
  232. +215 −0 contrib/camltk4/frx/frx_text.ml
  233. +55 −0 contrib/camltk4/frx/frx_toplevel.ml
  234. +7 −0 contrib/camltk4/frx/frx_toplevel.mli
  235. +37 −0 contrib/camltk4/frx/frx_widget.ml
  236. +4 −0 contrib/camltk4/frx/frx_widget.mli
  237. +62 −0 contrib/camltk4/lib/.cvsignore
  238. +59 −0 contrib/camltk4/lib/.depend
  239. +83 −0 contrib/camltk4/lib/Makefile
  240. +61 −0 contrib/camltk4/lib/modules
  241. +17 −0 contrib/camltk4/libsupport/.depend
  242. +64 −0 contrib/camltk4/libsupport/Makefile
  243. +21 −0 contrib/camltk4/libsupport/builtin_GetBitmap.ml
  244. +51 −0 contrib/camltk4/libsupport/builtin_GetCursor.ml
  245. +29 −0 contrib/camltk4/libsupport/builtin_GetPixel.ml
  246. +27 −0 contrib/camltk4/libsupport/builtin_ScrollValue.ml
  247. +380 −0 contrib/camltk4/libsupport/builtin_bind.ml
  248. +18 −0 contrib/camltk4/libsupport/builtin_bindtags.ml
  249. +123 −0 contrib/camltk4/libsupport/builtin_index.ml
  250. +35 −0 contrib/camltk4/libsupport/builtin_palette.ml
  251. +68 −0 contrib/camltk4/libsupport/builtin_text.ml
  252. 0  contrib/camltk4/libsupport/builtina_empty.ml
  253. +664 −0 contrib/camltk4/libsupport/camltk.c
  254. +34 −0 contrib/camltk4/libsupport/camltk.mli
  255. +21 −0 contrib/camltk4/libsupport/canvas_bind.ml
  256. +3 −0  contrib/camltk4/libsupport/canvas_bind.mli
  257. +72 −0 contrib/camltk4/libsupport/catchexc.ml
  258. +29 −0 contrib/camltk4/libsupport/dialog.ml
  259. +14 −0 contrib/camltk4/libsupport/dialog.mli
  260. +130 −0 contrib/camltk4/libsupport/hashtblc.ml
  261. +76 −0 contrib/camltk4/libsupport/hashtblc.mli
  262. +19 −0 contrib/camltk4/libsupport/optionmenu.ml
  263. +10 −0 contrib/camltk4/libsupport/optionmenu.mli
  264. +260 −0 contrib/camltk4/libsupport/protocol.ml
  265. +101 −0 contrib/camltk4/libsupport/protocol.mli
  266. +22 −0 contrib/camltk4/libsupport/report.ml
  267. +16 −0 contrib/camltk4/libsupport/selection_handle_set.ml
  268. +3 −0  contrib/camltk4/libsupport/selection_handle_set.mli
  269. +10 −0 contrib/camltk4/libsupport/selection_own_set.ml
  270. +3 −0  contrib/camltk4/libsupport/selection_own_set.mli
  271. +228 −0 contrib/camltk4/libsupport/support.ml
  272. +81 −0 contrib/camltk4/libsupport/support.mli
  273. +23 −0 contrib/camltk4/libsupport/text_tag_bind.ml
  274. +3 −0  contrib/camltk4/libsupport/text_tag_bind.mli
  275. +75 −0 contrib/camltk4/libsupport/textvariable.ml
  276. +23 −0 contrib/camltk4/libsupport/textvariable.mli
  277. +3 −0  contrib/camltk4/libsupport/winfo_contained.ml
  278. +3 −0  contrib/camltk4/libsupport/winfo_contained.mli
  279. +7 −0 contrib/debugger/.cvsignore
  280. +181 −0 contrib/debugger/Makefile
  281. +208 −0 contrib/debugger/breakpoints.ml
  282. +48 −0 contrib/debugger/breakpoints.mli
  283. +36 −0 contrib/debugger/checkpoints.ml
  284. +39 −0 contrib/debugger/checkpoints.mli
  285. +927 −0 contrib/debugger/command_line_interpreter.ml
  286. +7 −0 contrib/debugger/command_line_interpreter.mli
  287. +96 −0 contrib/debugger/communication.c
  288. +228 −0 contrib/debugger/communication.ml
  289. +117 −0 contrib/debugger/communication.mli
  290. +21 −0 contrib/debugger/constants.c
  291. +38 −0 contrib/debugger/debugger_config.ml
  292. +18 −0 contrib/debugger/debugger_config.mli
  293. +163 −0 contrib/debugger/events.ml
  294. +57 −0 contrib/debugger/events.mli
  295. +90 −0 contrib/debugger/frames.ml
  296. +37 −0 contrib/debugger/frames.mli
  297. +34 −0 contrib/debugger/history.ml
  298. +5 −0 contrib/debugger/history.mli
  299. +131 −0 contrib/debugger/input_handling.ml
  300. +51 −0 contrib/debugger/input_handling.mli
Sorry, we could not display the entire diff because too many files (1,045) changed.
View
447 CHANGES
@@ -0,0 +1,447 @@
+* 2009-11-13: contrib/libunix/errmsg.c, change obsolete sys_errlist and
+ sys_nerr use to strerror call using HAS_STRERROR flag.
+
+Caml Light 0.81:
+----------------
+
+* 2009-11-09: fixed segfault bug (in 64 bits) in function text_size
+
+* 2009-11-09: fixed segfault in compilation with gcc-4.3 (in 64 bits)
+
+Caml Light 0.80:
+----------------
+
+* License is modified: it is now the same as Objective Caml compler's one.
+
+* Warnings in C code have been eliminated.
+
+* Standard library:
+ - module float: long standing bug in the implementation of sinh is removed.
+
+Caml Light 0.77:
+---------------
+
+Fixed some bugs, now demands ANSI C.
+
+Caml Light 0.76:
+---------------
+
+Caml Light 0.75:
+---------------
+
+Caml Light 0.74:
+---------------
+
+* Typing: when typing a sequence (e1;e2), warn if e1 does not have
+ type "unit".
+
+* Standard library:
+ - module string: added index_char, rindex_char, index_char_from,
+ rindex_char_from.
+ - module vect: added init_vect.
+ - module format: added a printf facility to control the pretty-printer.
+ - module float: more floating-point functions (all ANSI-C functions).
+ - The iterators do_list, do_vect et al have more restricted types, e.g.
+ ('a -> unit) -> 'a list -> unit instead of ('a -> 'b) -> 'a list -> unit.
+ - module sys: new function sys__time to measure elapsed time.
+
+* MS Windows port: fixed bugs in functions over graphics__image.
+
+* libnum: square root rewritten. Many bug fixes to support 64 bits
+ architectures. Lot of functions rewritten or added. More tests
+ added.
+ Module nat: now performs sanity checks.
+ New module fnat: the same functionality as module nat, without
+ sanity checks.
+ The toplevel "camlnum" now comes with printers installed for the
+ num types.
+ Assembly code for pentium processors is now supported (on average
+ this implementation is approximately 3 times faster than the pure C
+ implementation) (set the variable BIGNUM_ARCH to pentium in the
+ Makefile of the contrib directory).
+
+* camllex: fixed bug causing undetected type errors in lexer definitions.
+
+Caml Light 0.73:
+---------------
+
+* Standard library:
+ - Fixed a bug with hasthbl__do_table_rev, causing #open of a module
+ with multiply defined identifiers to behave incorrectly.
+ - map__iter now conforms to the documentation w.r.t. old bindings.
+
+* MS Windows port: fixed several bugs in the interactive application
+ that showed up only under Win 3.1.
+
+Caml Light 0.72:
+---------------
+
+* Parsing: fixed precedence of alphanumeric user-defined infixes,
+ as well as lor, land, lxor; fixed location bug in error reporting
+ involving the empty list [].
+
+* Typing: better handling of constant or non-contractive type abbreviations
+ such as type 'a t == int or type 'a t == 'a.
+
+* Standard library:
+ - The type 'a option = None | Some of 'a is now a built-in type;
+ - Module "format": added ability to run several formatters with
+ different output channels in parallel;
+ - Module "genlex": better handling of comments and character literals;
+ - Module "hashtbl": fixed memory leak caused by hashtbl__remove;
+ - Module "int": added the constants max_int and min_int
+ - Module "printf": added the sprintf function to output to a string
+ - Module "stream": fixed unsharing bug in streams built by stream_from
+ - Module "string": added the "concat" function to catenate a list of strings.
+
+* Compilation: fixed handling of top-level exceptions in compilation
+ units (e.g. let x = raise Foo;;).
+
+* Run-time system: allocation bug for the Sys_error exception fixed;
+ fixed pointer assignment bug in the parsing engine.
+
+* MS Windows port: numerous fixes in the interactive toplevel application;
+ fully automatic installation procedure.
+
+* Emacs editing mode for Caml replaced by Ian Zimmerman's caml-mode.
+ It's a complete reimplementation that offers fully automatic
+ indenting and much more.
+
+* caml-tex formatter: also available for LaTeX 2e
+ (contributed by Jens Kloecker).
+
+* X11 graphics primitives: bug fixes in event handling and
+ interaction between close_graph and image reclaimation.
+
+* MS Windows graphics primitives: blit_image, draw_image, get_image
+ now working properly; drawing area no longer limited to 600x400.
+
+* libnum: bug in square root fixed.
+
+* libstr: fixed bug in string_before when length = 0.
+
+* libunix: pipe bugs in open_process_in fixed; termios interface more
+ POSIX compliant.
+
+
+Caml Light 0.71:
+---------------
+
+* Port to MS Windows (3.1, 95, NT).
+
+* Parsing: better handling of optional ";", concatenations (@, ^) now
+ associate to the right.
+
+* Typing: type constraints in inner lets could cause incorrect generalizations;
+ now, all type variables in type constraints are considered bound at
+ the outermost "let".
+
+* Compilation: bug fix in "when" clauses in pattern-matchings on mutables.
+
+* Standard library: fixed bug in parsing engine that generated wrong symbol
+ positions for epsilon-productions; various fixes in "format".
+
+* camlyacc: trailer text in grammar was not copied to generated file.
+
+* libunix: added "gettimeofday", bug fixes in "select", "times",
+ "open_process_in".
+
+* libnum: bug in conversion to string fixed.
+
+* French version for the Macintosh (thanks to Jerome Kasparian).
+
+Caml Light 0.7:
+--------------
+
+* Source-level debugger with replay capabilities. Compiler support for
+ the debugger added. [Unix-only]
+
+* New contributed libraries and tools:
+ - camltk: a complete X-windows toolkit based on TCL/TK.
+ - camlpro: a profiler for Caml Light programs (execution counts)
+ - lorder: determine ordering of .zo files at link-time
+
+* camlbrowser: a camltk-based graphics browser for Caml sources
+ and interfaces, with hypertext navigation. [Unix-only]
+
+* Polymorphism is now restricted to values (let x = e generalizes the type of
+ x only if e is syntactically a value, e.g. a constant, a variable, a
+ function, a tuple of values, etc). This ensures correct, type-safe handling
+ of polymorphic mutable structures.
+
+* "Guards" in pattern-matching (match ... with pat when cond -> expr).
+
+* Partial matches and unused match cases are correctly detected now.
+
+* Internationalized error messages (controlled by the LANG environment
+ variable; known languages so far: english, french, spanish,
+ german, and italian).
+ More detailed error messages.
+
+* Various fixes in the garbage collector to fight fragmentation of the
+ major heap, result in major speedups for some long-running programs.
+
+* Generic comparisons (prefix < : 'a -> 'a -> bool). Compiler optimizations
+ for comparisons on base types.
+
+* Type-checker rewritten in bottom-up style instead of top-down style.
+ Hopefully this makes type errors more understandable.
+
+* let rec (f : ty) = ... now supported.
+
+* New class of infix and prefix symbols supported (e.g. *=, !!, ++, with
+ precedence/associativity determined by their first character).
+
+* Syntactic sugar:
+ - Alternate syntax for string access and update (s.[i], s.[i] <- c).
+ - Final semicolons permitted in sequences, lists, arrays and records
+ (e.g. begin ...; ...; end or [1;2;]).
+ - Initial | permitted in pattern matchings and type definitions
+ (e.g. function | pat -> expr | ...
+ or type t = | Cstr1 | ...)
+ - "&&" and "||" synonymous for "&" and "or".
+
+* Optimized access to unqualified identifiers in symbol tables.
+
+* Parser cleaned up a bit, reduce/reduce conflicts eliminated.
+
+* New library modules: format (to write pretty-printers), gc (to control the
+ garbage collector and obtain various statistics on memory allocation).
+
+* The toplevel pretty-prints values and types.
+
+* New toplevel functions: install_printer (user-defined printing functions,
+ now type safe and associated with a type expression -- e.g. int list --
+ not with a type constructor -- e.g. list); set_print_depth and
+ set_print_length (control how much is printed).
+
+* Better support for non-generalizable type variables in phrases:
+ they no longer cause an error immediately, the check is delayed till
+ the end of the compilation unit.
+
+* Static type-checking of printf. User-defined printers supported in printf
+ formats (%a and %t).
+
+* "camlc -W" prints extra warnings (useless #open, capitalized variable, ...).
+
+* camlyacc: more checks on grammar for missing actions, etc.
+ Parsing engine now reentrant; a camlyacc-generated parser can call
+ another one in one of its actions. Bug with tokens having a tuple as
+ semantic attribute fixed.
+
+* Better support for 64-bit architectures: 32-bit architectures can read
+ values written on a file by a 64-bit architecture; max length of strings
+ and arrays now determined by the runtime system.
+
+* New primitive ouput_compact_value to write arbitrary values to disk in
+ a more compact (but more CPU-demanding) format than output_value.
+
+* More robust parsing of argv (some Unix kernels set argv[0] = argv[1] = file
+ when a #! file is run).
+
+* CAMLRUNPARAM environment variable to set GC parameters.
+
+* contrib/libgraph: implemented alternate event handling methods if async I/O
+ are not available; ask for system calls to be restarted if possible;
+ restart read and write system calls if interrupted; better handling
+ of "button up" and "mouse motion" events.
+
+* contrib/libnums: upgraded the bignum library; better 64-bit support
+ (but still has some 64-bit bugs); alternate names for num operations
+ (+/ -/ */ etc).
+
+Main incompatibilities with Caml Light 0.61:
+
+* Polymorphic generalization has been severely restricted to eliminate
+ unsoundness w.r.t. polymorphic mutables. As a consequence, several
+ "let" declarations that used to be polymorphic are now monomorphic,
+ which may cause type errors later. See the manual p. 54 for a complete
+ description of the problem and several workarounds.
+
+* Due to the new infix operators, extra blank space sometimes needs
+ to be inserted, e.g. `x+!y' should now be written `x+ !y'
+ (or better yet, `x + !y').
+
+
+Caml Light 0.61:
+----------------
+
+* Pattern-matching against (C x) where C has several arguments now works
+ correctly.
+
+* The fatal error "labels_of_type" has been fixed (it was raised when
+ typing e.label, where the type inferred for e is not a record type,
+ but an abbreviation for a record type).
+
+* Hashing has been rewritten to give consistent results across all
+ architectures, including when -custom is used.
+
+* output_value and intern_value are now fully compatible across 32-bit and
+ 64-bit architectures. A 32-bit architecture can read values written
+ on a 64-bit architecture.
+
+* Better error message when compiling a .ml whose .mli has not been compiled.
+
+* The preprocessed files are more compatible with cpp: (**) instead of /**/.
+
+* Typos in library interfaces fixed.
+
+Caml Light 0.6:
+---------------
+
+* Better handling of type abbreviations. Implementing an abstract type
+ as an abbreviation now works correctly.
+
+* Debugging mode (option -g to camlc and camllight) to get access
+ to the internals of module implementations.
+
+* 64-bit architectures are supported.
+
+* New library modules:
+ genlex generic lexical analyser
+ set applicative sets over ordered types
+ map applicative maps over ordered types
+ baltree balanced binary trees over ordered types
+
+* "compile" command at toplevel (especially useful in the Macintosh version).
+
+* #directory directive.
+
+* Better support for ISO-Latin-1 character set.
+
+* -i option also works when compiling .mli files.
+
+* Errors and warnings: detection of type redefinitions .ml/.mli; warning for
+ partial applications in sequences
+
+* Bug fixes: removed incorrect "optimizations" in stream parsers; incorrect
+ declaration of string__compare_strings; stream__stream_get fixed;
+ POPTRAP restarts correctly after signal handling.
+
+* Optimizations: io__input_line rewritten in C.
+
+* New functions: parsing__rhs_start, parsing__rhs_end; sys__interactive.
+
+* New contributed libraries and tools:
+ camlmode Emacs editing mode for Caml Light
+ mletags Indexing of Caml Light source files for use with Emacs "tags"
+ libnum Arbitrary-precision arithmetic
+ libstr String operations, regular expressions
+
+* The 80386 PC version is now DPMI-compliant, hence it can run under Windows
+ (in text mode inside a DOS windows and with no graphics, though).
+
+* More examples, including those from the book "Le langage Caml".
+
+* libunix: tty interface (POSIX termios), popen-style functions.
+
+Caml Light 0.5:
+---------------
+
+Language extensions:
+
+* Streams and stream matching, for writing parsers and printers.
+
+* Abstract types can now be implemented as type abbreviations.
+
+* Constructors for variant types are now either constant or
+non-constant, instead of having a fixed arity as before. This fixes
+the nasty problem of ref(1,2) being rejected because ref has arity 1.
+
+Extensions to the caml light environment:
+
+* A general mechanism to link Caml Light code with C code. As a
+consequence, an X-windows interface and a library of Unix system calls
+are now provided.
+
+* Two new commands: camllibr, to build libraries, and camlmktop, to
+construct custom toplevel systems.
+
+* Several new modules in the library (printf, hashtbl, random, stack,
+queue, ...)
+
+* Executable bytecode files are now machine-independent: you can run
+the same bytecode file on different architectures.
+
+Bug fixes: lots of them. The most important are:
+
+* Pattern-matching over mutable structures is now correctly compiled:
+modifying the matched structure after matching, then accessing parts
+of the structure used to fail in various ways; this is now safe.
+
+* Redefinition of exceptions is now correctly handled.
+
+Implementation changes:
+
+* A new garbage collector. The major collector is now incremental,
+meaning that garbage collection is even less disruptive than before.
+
+* The produced bytecode is slightly better, due to several new
+optimizations in the compiler back-end.
+
+* The linker has been separated from the compiler, and is now clever
+enough to avoid linking in useless code. To support this, the format
+of .zo files was changed. The new format is much more compact, loads
+faster, and supports libraries.
+
+* Autoconfiguration script.
+
+Microcomputer ports:
+
+* Graphics primitives.
+
+* For the Macintosh port, the toplevel system is now a standalone
+application, with its own user interface, and does not require MPW
+anymore. (The batch compilers still require MPW.)
+
+* The PC ports work in conjunction with TSR line editors.
+
+* The 80386 PC port is now VCPI-compliant, and handles keyboard
+interrupts correctly.
+
+Main incompatibilities with Caml Light 0.41:
+
+* Assignment operations such as :=, vect_assign, <- now return (), instead
+of the new value.
+
+* The "failure" exception from the standard library is now named "Failure".
+
+* Searching functions from the standard library (assoc, assq, ...) now
+raise "Not_found" on error, instead of "failure".
+
+* Some library modules have been renamed or modified. The old "unix"
+module is now named "sys". The new "sys" module is less Unix-specific.
+Some of the functions in the old "unix" module have disappeared, other
+have a slightly different interface. The old "hash" module is now
+subsumed by the "hashtbl" module.
+
+
+Caml Light 0.41:
+----------------
+
+* Alternate spelling for floating-point operators: +. -. *. etc.
+
+* New library functions: io__input_line, lexing__create_lexer_string.
+
+* io__seek*, io__pos* more efficient.
+
+
+Caml Light 0.4:
+---------------
+
+* A lexer generator (in the style of lex) and a parser generator (in
+ the style of yacc). These tools makes it easier to write compilers
+ and similar programs. They also clean up the bootstrapping process a lot.
+
+* Two new ports to microcomputers: to the 386 PC, and to the Amiga.
+ The 386 PC version runs in 32 bit protected mode, and takes
+ advantage of memory above 640K.
+
+* Many bug fixes.
+
+* A simpler installation procedure.
+
+Caml Light 0.3:
+---------------
+
+* First public release.
View
21 COPYRIGHT
@@ -0,0 +1,21 @@
+LEGAL NOTICE
+
+Software: Caml Light, version 0.75 of Janvier 1999, hereinafter
+referred to as "the software".
+
+The software has been designed and produced by Xavier Leroy,
+Damien Doligez, Francois Rouaix, Jerome Vouillon and Pierre Weis,
+research workers for the Institut National de Recherche en Informatique et
+en Automatique (INRIA) - Domaine de Voluceau - Rocquencourt - 78153 Le
+Chesnay Cedex - France.
+
+INRIA holds all ownership rights to Caml Light version 0.75.
+
+The software has been registered at Agence pour la Protection
+des Programmes (APP).
+
+The software is distributed under the license provided into the
+LICENSE file included in this directory.
+
+
+
View
207 INSTALL
@@ -0,0 +1,207 @@
+
+ INSTALLING CAML LIGHT ON A UNIX SYSTEM
+
+
+1- Edit the file src/Makefile. Change the variable definitions at
+the beginning of the Makefile, to indicate which C compiler to use,
+and where to install files. See the machine-specific hints at the end
+of this file.
+
+2- Configure the system. In the src/ subdirectory, do:
+
+ make configure
+
+This generates the two configuration files "m.h" and "s.h" in the
+config/ subdirectory. If something goes wrong during the make,
+or if the generated "m.h" and "s.h" files cause errors later on, then
+change to the config/ subdirectory, do
+
+ cp m-templ.h m.h
+ cp s-templ.h s.h
+
+and edit "m.h" and "s.h" by hand, following the guidelines in the
+comments.
+
+3- From the src/ subdirectory, do:
+
+ make world
+
+This builds all components of Caml Light for the first time. It takes
+about two minutes on a modern workstation. The "make" ends up with a
+little self-test. Don't forget to check the results, as
+indicated. This phase is fairly verbose; consider redirecting the
+output to a file:
+
+ make world > log.world 2>&1 # in sh
+ make world >& log.world # in csh
+
+4- To be sure everything works well, you can try to bootstrap the
+system --- that is, to recompile all Caml Light sources with the newly
+created compiler. From the src/ subdirectory, do:
+
+ make bootstrap
+
+or, better:
+
+ make bootstrap > log.bootstrap 2>&1 # in sh
+ make bootstrap >& log.bootstrap # in csh
+
+This takes slightly less time than the "make world" phase. The "make
+bootstrap" checks that the bytecode programs compiled with the new
+compiler are identical to the bytecode programs compiled with the old
+compiler. If this is the case, you can be pretty sure the Caml Light
+system has been correctly compiled. Otherwise, this does not
+necessarily means something went wrong. The best thing to do is to try
+a second bootstrapping phase: just do "make bootstrap" again. It will
+either crash almost immediately, or re-re-compile everything correctly
+and reach the fixpoint.
+
+5- You can now install the Caml Light system. This will create the
+following commands (in the directory set to BINDIR in src/Makefile):
+
+ camllight the interactive, toplevel-based system
+ camlc the batch compiler
+ camlrun the runtime system
+ camlyacc the parser generator
+ camllex the lexer generator
+ camlmktop a tool to make toplevel systems that integrate
+ user-defined C primitives
+
+From the src/ directory, become superuser and do "make install".
+
+6- The directory where camlrun resides must be in the PATH variable
+for camlc and camllight to work properly. (Actually, camlc and
+camllight are shell-scripts that call "camlrun" on various
+bytecode files.) Hence, if you have installed camlrun in a
+non-standard directory, be careful to add it to the PATH variable
+before running camlc or camllight.
+
+7- Now that the Caml Light compiler is installed, you can compile the
+tools and libraries contained in the contrib/ directory: source-level
+replay debugger, X Windows user interface toolkit, "tags" program for
+Emacs, arbitrary-precision rational arithmetic, Unix system calls
+interface, etc. The file contrib/INDEX gives a short description of
+the packages contained in contrib/ (what they do, what they require).
+The subdirectories of contrib/ also contain more information in README
+and INSTALL files. Read the descriptions and choose which packages
+you need.
+
+8- Edit the file contrib/Makefile to indicate which packages to
+install, which C compiler to use, where to find external libraries on
+your system, and where to install files. It is highly recommended to
+use the same C compiler used to compile the core system (the one
+specified in src/Makefile).
+
+9- Make sure you have not erased any of the files in src/ that have
+been generated during the compilation of the core system. If you
+have, recompile the core system (step 3- above).
+
+10- From the contrib/ subdirectory, do:
+
+ make all
+
+or, better,
+
+ make all > log.all 2>&1 # in sh
+ make all >& log.all # in csh
+
+11- You can now install the packages. From the contrib/ directory,
+become superuser and do "make install".
+
+12- Installation is complete. Time to clean up.
+
+ (cd src; make clean)
+ (cd contrib; make clean)
+
+
+IF SOMETHING GOES WRONG:
+
+Read the "common problems" and "machine-specific hints" section at the
+end of this file.
+
+Check the files m.h and s.h in config/. Wrong endianness or alignment
+constraints in m.h will immediately crash the bytecode interpreter.
+
+If you get a "segmentation violation" signal, check the limits on the
+stack size and data segment size (type "limit" under csh or
+"ulimit -a" under bash). Make sure the limit on the stack size is
+at least 2M.
+
+Try recompiling the runtime system with optimizations turned off. The
+runtime system contains some complex, atypical pieces of C code that
+can uncover bugs in optimizing compilers. Alternatively, try another C
+compiler (e.g. gcc instead of the vendor-supplied cc).
+
+You can also build a debug version of the runtime system. Go to the
+src/runtime/ directory and do "make camlrund". Then, copy camlrund to
+../camlrun, and try again. This version of the runtime system contains
+lots of assertions and sanity checks that could help you pinpoint the
+problem.
+
+If something goes wrong during the compilation of one of the packages
+in contrib/, check the README and INSTALL files in the corresponding
+directory for hints. If you really can't get one of the packages to
+compile, remove it from the PACKAGES variable in contrib/Makefile and
+go ahead with the others.
+
+
+COMMON PROBLEMS:
+
+* camlc or camllight complain that camlrun cannot be found. Make sure
+that the directory containing camlrun is in your PATH (see point 6- above).
+
+* The Makefiles assume that make execute commands by calling /bin/sh. They
+won't work if /bin/csh is called instead. You may have to unset the SHELL
+environment variable, or set it to /bin/sh.
+
+* You can safely ignore the following warnings:
+
+- ar or ranlib complains that fix_code.o has no symbol table.
+ It's actually empty with some configurations.
+
+- type clashes between enumeration types and integers. This is perfectly
+ correct ANSI C.
+
+* gcc 2.6.0 has been reported to generate incorrect code for the
+runtime system in -O mode. Upgrade to 2.7.2 or turn -O off.
+
+MACHINE-SPECIFIC HINTS:
+
+* On HP 9000/700 machines under HP/UX 9. Some versions of cc are
+unable to compile correctly the runtime system (wrong code is
+generated for (x - y) where x is a pointer and y an integer). This
+causes "make world" to crash when compiling in src/lib. Fix: use
+another C compiler (gcc works fine).
+
+* On DECstations 3000 under OSF1 3.0: "make configure" hangs while
+testing asynchronous I/O. This may even hang your login shell as well.
+Apparently, asynchronous I/O are severely buggy in the 3.0 kernel.
+Fix: comment out lines 287-290 in config/autoconf and run "make configure"
+again.
+
+* On older versions of Linux, it has been reported that sed has a
+non-standard syntax for scripts that causes some of the sed-scripts in
+src/runtime/Makefile and src/linker/Makefile to fail during "make world".
+(We did not experience this problem with the versions of Linux we
+use.) You'll have to adapt the sed scripts, then do "make clean", then
+do "make world" again. It is crucial to do "make clean", otherwise
+incorrectly generated files will remain.
+
+* On MIPS machines from MIPS Co. Add "-systype bsd43" to OPTS.
+Also, some versions of the cc compiler are reportedly unable to
+compile src/runtime/interp.c ("as1: internal: unexpected opcode bcond06").
+Either compile without optimizations (remove -O from OPTS in
+src/Makefile) or use gcc.
+
+* On some Next machines. cc pretends to be gcc but is not quite gcc.
+If the compilation of src/runtime/interp.c causes syntax errors, insert
+#undef __GNUC__ at the very beginning of src/runtime/misc.h.
+
+* On SGI Indigo under IRIX 4.0. "ar" emits some warnings about multiple
+definitions of global variables. Ignore them; that's just ANSI pedantism.
+
+* On Macintoshes under A/UX with gcc. It may be necessary to add
+-D_SYSV_SOURCE to OPTS.
+
+
+
View
9 KNOWN-BUGS
@@ -0,0 +1,9 @@
+The following problems have not been fixed at the time of this release:
+
+1- Stream concatenation using [< ... >] does not always preserve the
+ sharing among streams, and sometimes duplicate stream subcomponents.
+ For instance, if you define s' = [< '1; s >] and then read alternatively
+ from s' and from s, a given element of s can be read twice.
+ The problem occurs only if s is in tail position inside s'.
+ To guarantee proper sharing, move s in non-tail position, e.g.
+ take s' = [< '1; s; [<>] >].
View
618 LICENSE
@@ -0,0 +1,618 @@
+In the following, "the Library" refers to all files marked "Copyright
+INRIA" in the following directories and their sub-directories:
+
+ runtime, config, contrib, lib
+
+and "the Compiler" refers to all files marked "Copyright INRIA" in the
+other directories and their sub-directories.
+
+The Compiler is distributed under the terms of the Q Public License
+version 1.0 (included below).
+
+The Library is distributed under the terms of the GNU Library General
+Public License version 2 (included below).
+
+As a special exception to the GNU Library General Public License, you
+may link, statically or dynamically, a "work that uses the Library"
+with a publicly distributed version of the Library to produce an
+executable file containing portions of the Library, and distribute
+that executable file under terms of your choice, without any of the
+additional requirements listed in clause 6 of the GNU Library General
+Public License. By "a publicly distributed version of the Library",
+we mean either the unmodified Library as distributed by INRIA, or a
+modified version of the Library that is distributed under the
+conditions defined in clause 3 of the GNU Library General Public
+License. This exception does not however invalidate any other reasons
+why the executable file might be covered by the GNU Library General
+Public License.
+
+----------------------------------------------------------------------
+
+ THE Q PUBLIC LICENSE version 1.0
+
+ Copyright (C) 1999 Troll Tech AS, Norway.
+ Everyone is permitted to copy and
+ distribute this license document.
+
+The intent of this license is to establish freedom to share and change
+the software regulated by this license under the open source model.
+
+This license applies to any software containing a notice placed by the
+copyright holder saying that it may be distributed under the terms of
+the Q Public License version 1.0. Such software is herein referred to
+as the Software. This license covers modification and distribution of
+the Software, use of third-party application programs based on the
+Software, and development of free software which uses the Software.
+
+ Granted Rights
+
+1. You are granted the non-exclusive rights set forth in this license
+provided you agree to and comply with any and all conditions in this
+license. Whole or partial distribution of the Software, or software
+items that link with the Software, in any form signifies acceptance of
+this license.
+
+2. You may copy and distribute the Software in unmodified form
+provided that the entire package, including - but not restricted to -
+copyright, trademark notices and disclaimers, as released by the
+initial developer of the Software, is distributed.
+
+3. You may make modifications to the Software and distribute your
+modifications, in a form that is separate from the Software, such as
+patches. The following restrictions apply to modifications:
+
+ a. Modifications must not alter or remove any copyright notices
+ in the Software.
+
+ b. When modifications to the Software are released under this
+ license, a non-exclusive royalty-free right is granted to the
+ initial developer of the Software to distribute your
+ modification in future versions of the Software provided such
+ versions remain available under these terms in addition to any
+ other license(s) of the initial developer.
+
+4. You may distribute machine-executable forms of the Software or
+machine-executable forms of modified versions of the Software,
+provided that you meet these restrictions:
+
+ a. You must include this license document in the distribution.
+
+ b. You must ensure that all recipients of the machine-executable
+ forms are also able to receive the complete machine-readable
+ source code to the distributed Software, including all
+ modifications, without any charge beyond the costs of data
+ transfer, and place prominent notices in the distribution
+ explaining this.
+
+ c. You must ensure that all modifications included in the
+ machine-executable forms are available under the terms of this
+ license.
+
+5. You may use the original or modified versions of the Software to
+compile, link and run application programs legally developed by you or
+by others.
+
+6. You may develop application programs, reusable components and other
+software items that link with the original or modified versions of the
+Software. These items, when distributed, are subject to the following
+requirements:
+
+ a. You must ensure that all recipients of machine-executable
+ forms of these items are also able to receive and use the
+ complete machine-readable source code to the items without any
+ charge beyond the costs of data transfer.
+
+ b. You must explicitly license all recipients of your items to
+ use and re-distribute original and modified versions of the
+ items in both machine-executable and source code forms. The
+ recipients must be able to do so without any charges whatsoever,
+ and they must be able to re-distribute to anyone they choose.
+
+ c. If the items are not available to the general public, and the
+ initial developer of the Software requests a copy of the items,
+ then you must supply one.
+
+ Limitations of Liability
+
+In no event shall the initial developers or copyright holders be
+liable for any damages whatsoever, including - but not restricted to -
+lost revenue or profits or other direct, indirect, special, incidental
+or consequential damages, even if they have been advised of the
+possibility of such damages, except to the extent invariable law, if
+any, provides otherwise.
+
+ No Warranty
+
+The Software and this license document are provided AS IS with NO
+WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ Choice of Law
+
+This license is governed by the Laws of France. Disputes shall be
+settled by the Court of Versailles.
+
+----------------------------------------------------------------------
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
View
68 PORTING
@@ -0,0 +1,68 @@
+ Porting Caml Light to another system
+ ------------------------------------
+
+This note contains some hints on how to port Caml Light to a machine
+that does not run Unix.
+
+ARCHITECTURAL REQUIREMENTS:
+
+Caml Light has been designed for 32-bit architectures, with
+a flat address space. Porting to segmented address spaces is very
+difficult (the 8086 port required a huge amount of work).
+The code contains support for 64-bit architectures, but has only been
+tested on a Dec Alpha.
+
+COMPILER REQUIREMENTS:
+
+You'll need a robust, but not too fussy ANSI-C compiler. Robust,
+because the code for the runtime system is pretty complex (one huge
+function, a few large macros), and has been reported to break some
+compilers. Not too fussy, because some parts are in old-style C, and
+will probably be rejected by compilers that insist on doing inter-file
+type checking.
+
+OPERATING SYSTEM DEPENDENCIES:
+
+Caml Light has been developed under Unix, but actually uses very few
+Unix-specific features. All system functions used are in the standard
+ANSI C library, except open, read, write, close and lseek. Many
+compiler libraries provide emulations for these. Otherwise, you can
+emulate them on top of the standard IO library (fopen, fread, ...).
+That's kludgy, but it should work.
+
+HOW TO PROCEED:
+
+First port the runtime system (directory src/runtime) to the new
+machine. You'll have to write the configuration files (directory
+config/) by hand.
+
+Test the runtime system by compiling some Caml Light sample programs
+on a Unix machine, then transferring them (in binary mode) to the
+target machine, and run them through the runtime system. (Bytecode
+files are portable across architectures.)
+
+You can't just transfer camlcomp, camllink, camltop on the target
+machine and execute them as is. Well, you can execute them, but they
+won't work. That's because they contain some Unix-specific ML code,
+e.g. for filename handling. Instead:
+
+- Adapt src/lib/filename.ml and src/compiler/config.ml to the target
+operating system. filename.ml contains functions to handle file names.
+config.ml contains various constants, default names, prompts, ... In
+the current setting, they are derived from .mlp files, that contain
+the code for Unix, MS-DOS and Mac-OS, inside #ifdef directives. You
+can either add your code to the .mlp files, or write the .ml files by
+hand.
+
+- Compile all the ML code on a Unix machine.
+
+- Transfer the files to install (bytecode executables + standard
+library) to the host machine.
+
+- You should now be able to bootstrap the system on the host machine
+if you wish.
+
+Finally, you will have to write the driver programs camlc, camllight
+and camlmktop. You can either translate the shell scripts from the
+Unix version, or start with the C implementations found in the PC
+version.
View
31 READ.md
@@ -0,0 +1,31 @@
+Camllight version 0.81
+Version initiale. Cette vesion comporte un bug dans la gestion de la mémoire
+(Branche /src/runtime, essenteiellement fichier memory.c, misc.c, major_gc.c).
+Ce bug se manifeste par un Out of memory lors de l'éxécution de
+
+
+let rec puissance x = function
+ | 0 -> 1
+ | 1 -> x
+ | n when (n mod 2=0) -> let c= (puissance x (n/2)) in c*c
+ | n -> let c= (puissance x (n/2)) in c*c*x;;
+
+let evalue p x =
+ let nul = vect_of_list p
+ and n = list_length p
+ and res = ref 0
+ in (
+ for i = 0 to (n-1) do res:=!res + nul.(i)*(puissance x i);done;
+ !res
+ );;
+
+
+let rec randlist = function
+ | 0 -> []
+ | n -> (random__int 1432)::(randlist (n-1));;
+let c n = evalue (randlist n) 12;;
+
+for i = 1 to 10 do
+ (function _ -> ()) (c 131020);
+done ;;
+
View
144 README
@@ -0,0 +1,144 @@
+ This is release 0.75 of the Caml Light system, for Unix machines.
+
+OVERVIEW:
+
+ Caml Light is a small, portable implementation of the ML language.
+ that runs on most Unix machines. It has also been ported to the
+ Macintosh, the PC, and other microcomputers.
+
+ Caml Light implements the Caml language, a functional language from
+ the ML family. Caml is quite close to Standard ML, though not strictly
+ conformant. There are some slight differences in syntax and semantics,
+ and major differences in the module system.
+
+ Caml Light is implemented as a bytecode compiler, and fully
+ bootstrapped. The runtime system and bytecode interpreter is written
+ in standard C, hence Caml Light is easy to port to almost any 32 or 64 bit
+ platform. The whole system is quite small: about 100K for the runtime
+ system, and another 100K of bytecode for the compiler. 2 megabytes of
+ memory is enough to recompile the whole system. This stands in sharp
+ contrast with other implementations of ML, such as SML-NJ, that
+ requires about ten times more memory. Performance is quite good for a
+ bytecoded implementation.
+
+ Caml Light comes in two flavors: a classical, interactive, toplevel-based
+ system; and a standalone, batch-oriented compiler that produces standalone
+ programs, in the spirit of the Unix cc compiler. The former is good for
+ learning the language and testing programs. The latter integrates more
+ smoothly with the Unix programming environment: make, compilations under
+ Emacs, ... The generated programs are quite small, and can be used like
+ any other Unix command.
+
+CONTENTS:
+
+ src/ the sources for the core Caml Light system
+ src/runtime/ the bytecode interpreter and runtime system (in C)
+ src/lib/ the standard library (in Caml Light)
+ src/compiler/ the compiler (in Caml Light)
+ src/linker/ the linker (in Caml Light)
+ src/librar/ the linker (in Caml Light)
+ src/toplevel/ the toplevel interactive system (in Caml Light)
+ src/lex/ the lexer generator (in Caml Light)
+ src/yacc/ the parser generator (in C)
+ src/tools/ various utilities (sh, perl, C, Caml Light)
+ src/caml* the bootstrap compilers
+ config/ the configuration files and autoconfiguration tool
+ contrib/ the sources for various libraries and utilities
+ examples/ some example programs
+ COPYRIGHT INRIA's copyright notice
+ INSTALL instructions for installation
+ README this file
+ CHANGES what's new
+ PORTING hints on porting Caml Light to a non-Unix machine
+
+
+COPYRIGHT:
+
+ All files in this distribution are copyright INRIA and distributed
+ under the conditions stated in file COPYRIGHT.
+ They can be freely redistributed for non-commercial purposes, provided
+ the copyright notice remains attached.
+
+
+INSTALLATION:
+
+ See the file INSTALL for installation instructions on Unix
+ machines.
+
+
+DOCUMENTATION:
+
+ The Caml Light system is described in:
+
+ "The Caml Light system, release 0.75", by Xavier Leroy (reference manual)
+ "Functional programming using Caml Light", by Michel Mauny (tutorial)
+
+ These documents are distributed in Postscript, DVI, and plain text.
+ They can be obtained by anonymous FTP from ftp.inria.fr as described below.
+
+ The following Web site offers lots of information on Caml:
+
+ http://pauillac.inria.fr/caml/
+
+ including a comprehensive "Frequently Asked Questions" list, short
+ tutorials, and material for programming courses.
+
+
+AVAILABILITY:
+
+ The whole Caml Light distribution resides on ftp.inria.fr, and can
+ be accessed by anonymous FTP:
+
+ host: ftp.inria.fr (192.93.2.54)
+ directory: lang/caml-light
+
+ or through the Web at URL http://pauillac.inria.fr/caml/
+
+
+KEEPING IN TOUCH WITH THE CAML COMMUNITY:
+
+ There exists a mailing list of users of the Caml and Caml Light
+ systems developed at INRIA. The purpose of this list is to share
+ experience, exchange ideas (and even code), and report on applications
+ of the Caml language. This list is moderated; messages can be
+ written in English or in French. The list has about 200 subscribers.
+
+ Messages to the list should be sent to:
+
+ caml-list@inria.fr
+
+ If you wish to subscribe to this list, please send a message
+ (including your email address) to:
+
+ caml-list-request@inria.fr
+
+ The Usenet news group comp.lang.ml also contains discussions about
+ the ML family of programming languages, including Caml. The newsgroup
+ is moderated. For those without Usenet access, this newsgroup is
+ also accessible via a mailing list (to subscribe:
+ sml-list-request@cs.cmu.edu, to post a message: sml-list@cs.cmu.edu).
+
+BUG REPORTS AND USER FEEDBACK:
+
+ Send your bug reports by E-mail to
+
+ caml-light@inria.fr
+
+ or by paper mail to
+
+ Caml Light, projet Formel
+ INRIA Rocquencourt
+ B.P. 105
+ 78153 Le Chesnay
+ France
+
+ To be effective, bug reports should include a complete program (preferably
+ small) that exhibits the unexpected behavior, and the configuration
+ you are using (machine type, etc).
+
+ The mailing list caml-light@inria.fr is forwarded to a small
+ group of implementors at INRIA. For general questions and discussions,
+ caml-list@inria.fr is better; for bug reports and very specific
+ technical questions, caml-light@inria.fr is preferred. We often
+ cross-post from one list to the other, anyway.
+
View
2  config/.cvsignore
@@ -0,0 +1,2 @@
+s.h
+m.h
View
6 config/Makefile
@@ -0,0 +1,6 @@
+all:
+ @echo "Run 'sh autoconf' or 'sh autoconf gcc' or ..."
+
+clean scratch:
+ rm -f m.h s.h
+ cd auto-aux; rm -f *.o a.out
View
2  config/auto-aux/.cvsignore
@@ -0,0 +1,2 @@
+tst
+hasgot.c
View
95 config/auto-aux/align.c
@@ -0,0 +1,95 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <setjmp.h>
+
+long foo;
+
+void access16(p)
+ short * p;
+{
+ foo = *p;
+}
+
+void access32(p)
+ long * p;
+{
+ foo = *p;
+}
+
+jmp_buf failure;
+
+void sig_handler(dummy)
+ int dummy;
+{
+ longjmp(failure, 1);
+}
+
+int test(fct, p)
+ void (*fct)();
+ char * p;
+{
+ int res;
+
+ signal(SIGSEGV, sig_handler);
+ signal(SIGBUS, sig_handler);
+ if(setjmp(failure) == 0) {
+ fct(p);
+ res = 0;
+ } else {
+ res = 1;
+ }
+ signal(SIGSEGV, SIG_DFL);
+ signal(SIGBUS, SIG_DFL);
+ return res;
+}
+
+volatile int timeout;
+
+void alarm_handler(dummy)
+ int dummy;
+{
+ timeout = 1;
+}
+
+void use(n)
+ int n;
+{
+ return;
+}
+
+int speedtest(p)
+ char * p;
+{
+ int * q;
+ volatile int total;
+ int i;
+ volatile int sum;
+
+ signal(SIGALRM, alarm_handler);
+ sum = 0;
+ timeout = 0;
+ total = 0;
+ alarm(1);
+ while(! timeout) {
+ for (q = (int *) p, i = 1000; i > 0; q++, i--) sum += *q;
+ total++;
+ }
+ use(sum);
+ signal(SIGALRM, SIG_DFL);
+ return total;
+}
+
+main()
+{
+ long n[1001];
+ int speed_aligned, speed_unaligned;
+
+ if (test(access16, (char *) n + 1)) exit(1);
+ if (test(access32, (char *) n + 1)) exit(1);
+ if (test(access32, (char *) n + 2)) exit(1);
+ speed_aligned = speedtest((char *) n);
+ speed_unaligned = speedtest((char *) n + 1);
+ if (speed_aligned >= 3 * speed_unaligned) exit(1);
+ exit(0);
+}
View
45 config/auto-aux/async_io.c
@@ -0,0 +1,45 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <errno.h>
+#include "s.h"
+
+int signalled;
+
+sighandler_return_type sigio_handler(arg)
+ int arg;
+{
+ signalled = 1;
+}
+
+int main()
+{
+#if defined(SIGIO) && defined(FASYNC) && defined(F_SETFL) && defined(F_SETOWN)
+ int p[2];
+ int ret;
+#define OUT 0
+#define IN 1
+ if (pipe(p) == -1) return 1;
+ signalled = 0;
+ signal(SIGIO, sigio_handler);
+ ret = fcntl(p[OUT], F_GETFL, 0);
+ fcntl(p[OUT], F_SETFL, ret | FASYNC);
+ fcntl(p[OUT], F_SETOWN, getpid());
+ switch(fork()) {
+ case -1:
+ return 1;
+ case 0:
+ close(p[OUT]);
+ write(p[IN], "x", 1);
+ sleep(1);
+ exit(0);
+ default:
+ close(p[IN]);
+ while(wait(NULL) == -1 && errno == EINTR) /*nothing*/;
+ }
+ if (signalled) return 0; else return 1;
+#else
+ return 1;
+#endif
+}
View
21 config/auto-aux/bytecopy.c
@@ -0,0 +1,21 @@
+#include <stdlib.h>
+#include <string.h>
+char buffer[27];
+
+#ifdef reverse
+#define cpy(s1,s2,n) copy(s2,s1,n)
+#else
+#define cpy copy
+#endif
+
+main()
+{
+ cpy("abcdefghijklmnopqrstuvwxyz", buffer, 27);
+ if (strcmp(buffer, "abcdefghijklmnopqrstuvwxyz") != 0) exit(1);
+ cpy(buffer, buffer+3, 26-3);
+ if (strcmp(buffer, "abcabcdefghijklmnopqrstuvw") != 0) exit(1);
+ cpy("abcdefghijklmnopqrstuvwxyz", buffer, 27);
+ cpy(buffer+3, buffer, 26-3);
+ if (strcmp(buffer, "defghijklmnopqrstuvwxyzxyz") != 0) exit(1);
+ exit(0);
+}
View
38 config/auto-aux/dblalign.c
@@ -0,0 +1,38 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <setjmp.h>
+
+double foo;
+
+void access_double(p)
+ double * p;
+{
+ foo = *p;
+}
+
+jmp_buf failure;
+
+void sig_handler(sig)
+ int sig;
+{
+ longjmp(failure, 1);
+}
+
+main()
+{
+ long n[10];
+ int res;
+ signal(SIGSEGV, sig_handler);
+ signal(SIGBUS, sig_handler);
+ if(setjmp(failure) == 0) {
+ access_double((double *) n);
+ access_double((double *) (n+1));
+ res = 0;
+ } else {
+ res = 1;
+ }
+ signal(SIGSEGV, SIG_DFL);
+ signal(SIGBUS, SIG_DFL);
+ exit(res);
+}
View
25 config/auto-aux/endian.c
@@ -0,0 +1,25 @@
+#include <stdlib.h>
+#include "m.h"
+
+main()
+{
+ long n[2];
+ char * p, * bigendian, * littleendian;
+
+#ifndef CAML_SIXTYFOUR
+ n[0] = 0x41424344L;
+ bigendian = "ABCD";
+ littleendian = "DCBA";
+#else
+ n[0] = 0x4142434445464748L;
+ bigendian = "ABCDEFGH";
+ littleendian = "HGFEDCBA";
+#endif
+ n[1] = 0;
+ p = (char *) n;
+ if (strcmp(p, bigendian) == 0)
+ exit(0);
+ if (strcmp(p, littleendian) == 0)
+ exit(1);
+ exit(2);
+}
View
17 config/auto-aux/getgroups.c
@@ -0,0 +1,17 @@
+#include <sys/types.h>
+#include <sys/param.h>
+
+#ifdef NGROUPS
+
+int main()
+{
+ int gidset[NGROUPS];
+ if (getgroups(NGROUPS, gidset) == -1) return 1;
+ return 0;
+}
+
+#else
+
+int main() { return 1; }
+
+#endif
View
5 config/auto-aux/hasgot
@@ -0,0 +1,5 @@
+#!/bin/sh
+(echo "main() {"
+ for f in $*; do echo " $f();"; done
+ echo "}") > hasgot.c
+exec $cc -o tst hasgot.c > /dev/null 2>/dev/null
View
3  config/auto-aux/runtest
@@ -0,0 +1,3 @@
+#!/bin/sh
+$cc -o tst $* || exit 100
+exec ./tst
View
8 config/auto-aux/schar.c
@@ -0,0 +1,8 @@
+#include <stdlib.h>
+char foo[]="\377";
+main()
+{
+ int i;
+ i = foo[0];
+ exit(i != -1);
+}
View
7 config/auto-aux/schar2.c
@@ -0,0 +1,7 @@
+signed char foo[]="\377";
+main()
+{
+ int i;
+ i = foo[0];
+ exit(i != -1);
+}
View
8 config/auto-aux/sighandler.c
@@ -0,0 +1,8 @@
+#include <signal.h>
+
+main()
+{
+ SIGRETURN (*old)();
+ old = signal(SIGQUIT, SIG_DFL);
+ return 0;
+}
View
58 config/auto-aux/signals.c
@@ -0,0 +1,58 @@
+/* To determine the semantics of signal handlers
+ (System V: signal is reset to default behavior on entrance to the handler
+ BSD: signal handler remains active). */
+
+#include <stdio.h>
+#include <signal.h>
+
+/* Find a signal that is ignored by default */
+
+#ifdef SIGCHLD
+#define IGNSIG SIGCHLD
+#else
+#ifdef SIGIO
+#define IGNSIG SIGIO
+#else
+#ifdef SIGCLD
+#define IGNSIG SIGCLD
+#else
+#ifdef SIGPWR
+#define IGNSIG SIGPWR
+#endif
+#endif
+#endif
+#endif
+
+#ifdef IGNSIG
+
+int counter;
+
+void sig_handler(dummy)
+ int dummy;
+{
+ counter++;
+}
+
+int main(argc, argv)
+ int argc;
+ char ** argv;
+{
+ signal(IGNSIG, sig_handler);
+ counter = 0;
+ kill(getpid(), IGNSIG);
+ kill(getpid(), IGNSIG);
+ return (counter == 2 ? 0 : 1);
+}
+
+#else
+
+/* If no suitable signal was found, assume System V */
+
+int main(argc, argv)
+ int argc;
+ char ** argv;
+{
+ return 1;
+}
+
+#endif
View
9 config/auto-aux/sizes.c
@@ -0,0 +1,9 @@
+#include <stdlib.h>
+#include <stdio.h>
+int main(argc, argv)
+ int argc;
+ char ** argv;
+{
+ printf("%d %d %d\n", sizeof(int), sizeof(long), sizeof(long *));
+ return 0;
+}
View
310 config/autoconf
@@ -0,0 +1,310 @@
+#!/bin/sh
+
+case $1 in
+ "") cc=cc;;
+ *) cc=$1;;
+esac
+export cc
+
+cd auto-aux
+rm -f s.h m.h
+touch s.h m.h
+
+# Check the sizes of data types
+
+echo "Checking the sizes of integers and pointers..."
+set `sh ./runtest sizes.c`
+case "$1,$2,$3" in
+ 4,4,4) echo "OK, this is a regular 32 bit architecture.";;
+ 4,8,8) echo "Wow! A 64 bit architecture!"
+ echo "#define CAML_SIXTYFOUR" >> m.h;;
+ 8,*,*) echo "Wow! A 64 bit architecture!"
+ echo "Unfortunately, Caml Light does not handle the case"
+ echo "sizeof(int) = 8."
+ echo "Caml Light won't run on this architecture."
+ exit 2;;
+ *,4,8) echo "Wow! A 64 bit architecture!"
+ echo "Unfortunately, Caml Light cannot work in the case"
+ echo "sizeof(long) != sizeof(long *)."
+ echo "Caml Light won't run on this architecture."
+ exit 2;;
+ ?,?,?) echo "This architecture seems to be neither 32 bits nor 64 bits."
+ echo "Caml Light won't run on this architecture."
+ exit 2;;
+ *) echo "Unable to compile the test program."
+ echo "Make sure the C compiler is properly installed."
+ exit 2;;
+esac
+
+# "unix" is not always defined by cpp, so add it here just in case
+
+(echo "#ifndef unix"; echo "#define unix"; echo "#endif") >> s.h
+
+# Are chars signed?
+
+sh ./runtest schar.c
+case $? in
+ 0) echo "The char type is signed. Good!";;
+ 1) echo "The char type is not signed. Let's see if 'signed char' works."
+ sh ./runtest schar2.c
+ case $? in
+ 0) echo "Yes, it works. Good!"
+ echo "#define SIGNED_CHAR_WORKS" >> s.h;;
+ *) echo "No, it does not work. Let's try some compiler options."
+ goodopt=""
+ for option in -signed -fsigned-char; do
+ sh ./runtest $option schar.c
+ case $? in
+ 0) goodopt=$option; break;;
+ esac
+ done
+ case "$goodopt" in