Commit Graph

107 Commits (master)

Author SHA1 Message Date
David Allsopp 9e547e67dd Normalise \r\n to \n for warnings
The formatters used for printing warnings have text mode translation
enabled which means that any Windows endings which creep into warning
texts (e.g. from attributes) result in \r\r\n in the output.

The effect is largely innocuous, except that it causes the
deprecated_module_use test to fail on Windows.
2016-01-18 16:19:08 +00:00
Mark Shinwell 96287792b4 Move color_setting into Misc.Color 2016-01-12 14:35:17 +01:00
Mark Shinwell ca039d77fb Merge pull request #357 from mshinwell/flambda_prereq-misc-list
GPR#357: Add various utility functions in Misc
2016-01-12 14:17:55 +01:00
Damien Doligez 80c674b0c1 make the list functions tail-rec and improve documentation comments 2016-01-12 14:09:03 +01:00
Mark Shinwell be679a7453 Various changes 2015-12-30 14:43:44 +00:00
Mark Shinwell c3e15cd73b Various utility functions in Misc 2015-12-18 15:55:54 +00:00
Mark Shinwell 593738ae72 Add Misc.fatal_errorf 2015-12-18 15:50:24 +00:00
Hugo Heuzard 9eca3e4519 Parse arbitrary precision integers ..
.. and allow any letter in [g-zG-Z] as modifier (previously 'l','L','n')
Also allow modifier for floats
This give more freedom to ppx rewritters (what about a ppx for zarith)

Checks are performed when translating from Parsetree to Typedtree.
Invalid_literal is raised if the modifier is not recognized ([lLn]?)
Integer_overflow is raised as before.

Lexer: use g-zG-Z for integer literal modifier

Lexer: Allow modifier on float

Clean wrt previous commits

Lexer: use named substring

Cleanup

typo

doc

fix after rebase

rebase on  trunk

Update typecore.ml

Fix printast.ml
2015-12-03 17:20:48 +01:00
Jacques Garrigue a335b18a45 merge branches/gadt-warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:33:44 +00:00
Jacques Garrigue a09fb037ac add refuted cases, syntax is 'pat -> _'
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadt-warnings@16500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-15 01:55:52 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(Simon Cruanes and Gabriel Scherer)

Use one of
  -color auto
  -color always
  -color never

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:51 +00:00
Gabriel Scherer 5893536b14 add Color module Misc
(Simon Cruanes)

We use bold magenta for warnings, because it works on terminals with
white background.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16347 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:49 +00:00
Gabriel Scherer 41e0ecf2ef PR#6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 11:18:29 +00:00
Gabriel Scherer 81e8d5bdbb Cmm arithmetic optimisations.
Constant additions and tagging operations are moved out of
subexpressions when possible. Often they can be merged.

From Stephen Dolan:
  https://github.com/ocaml/ocaml/pull/17

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15820 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-07 11:32:12 +00:00
Gabriel Scherer 843f152505 simplify the spellcheck functions
- expose the core spellchecking functionality in Misc rather than Typetexp
- remove the too high-order (yet insufficiently parametric)
  Typetexp.spellcheck from the public interface
- rewrite the spellchecking functions for variants and fields in
  Typecore from the Misc functions rather than reusing
  Typetexp.spellcheck

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15650 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 14:46:16 +00:00
Alain Frisch 8c075ad80a Sync with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-27 16:43:24 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Alain Frisch e7ba464587 Add intel_proc.mli, get rid of arch64 bool ref, move StringSet/StringMap to misc.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15159 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 14:35:10 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Fabrice Le Fessant 504e86d722 Revert r13746 (demanded by Xavier)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 17:54:20 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Fabrice Le Fessant f9bd5f13a0 Experimental OCAMLCOMPPARAM for ocamlc/ocamlopt
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 19:13:24 +00:00
Jacques Garrigue c425ae1ce8 Fix PR#5985; compute injectivity of types but no new syntax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13634 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-30 05:26:57 +00:00
Gabriel Scherer e92b63fc21 PR#5957,PR#5920,PR#5925: LongString module to workaround 32bits string size limitations during bytecode linking (patch by Benoit Vaugon and Chet Murthy)
In PR#5925, Benoît Vaugon initially proposed the LongString module to
solve an issue with bytecode blocks of size > Sys.max_string_length on
32 bits architecture (16Mio). In PR#5957, Chet Murthy made small
changes to also fix the problem of debug information going above this
16Mio limit.

The LongString module should be reusable in other parts of the
compiler, should new 32bit-string-length issues arise.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-17 09:07:00 +00:00
Alain Frisch e7546ca216 PR#5768: On 'unbound identifier' errors, use spell-checking to suggest names present in the environment.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-16 13:54:24 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Damien Doligez 5b14388ad0 refactoring the "read n bytes from a channel into a new string" idiom
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-23 19:54:44 +00:00
Alain Frisch 350f214671 More clever algorithm to detect unused (recursive) type declarations.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11969 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-28 14:20:53 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez 04b1656222 clean up spaces and tabs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9547 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-22 12:48:24 +00:00
Nicolas Pouillard 81cfc29b31 Better handling of multiple extensions (foo.d.cmo, foo.p.cmx...)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7909 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-23 13:44:51 +00:00
Xavier Leroy 63c1789b5e Fusion des modifs faites sur la branche release jusqu'a la release 3.08.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-07-13 12:25:21 +00:00
Damien Doligez 43b02185d7 ajout option -stypes; depend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5478 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-04-02 01:32:09 +00:00
Xavier Leroy bae0f5d56e Chercher les infos sur le module Foo dans les fichiers Foo.{cmi,cmx} et foo.{cmi,cmx} (PR#1177)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4896 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-06-07 07:35:38 +00:00
Xavier Leroy 04ebbbfdc6 Ajout rev_split_words
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4783 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-05-07 13:16:28 +00:00
Xavier Leroy 71cf31f0e2 Ajout du packaging d'unites de compilation (option -pack)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-02-08 16:55:44 +00:00
Daniel de Rauglaudre fe0f46244c Added Misc.chop_extension_if_any for the case when the input filename does
not have any extension.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4327 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-01-28 17:25:26 +00:00
Luc Maranget f825892b07 bug 785 (debordement entier cmmgen)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-01-10 15:52:40 +00:00
Jacques Garrigue 447c79eade deplace expand_directory dans Misc, pour generaliser -I +package
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-12-28 05:02:43 +00:00
Pierre Weis cb681720ea Suppression de fonctions sur les listes redondantes car deja definies
dans la librairie standard. Attention Misc.for_all2 et List.for_all2
ont des semantiques tres legerement differentes. Il est donc hasardeux
de supprimer Misc.for_all2 sans une analyse précise de toutes ses
utilisations!


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3340 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-11-22 13:51:07 +00:00
Xavier Leroy 8599d817b4 Ajout split_last
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2878 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2000-02-28 15:47:13 +00:00
Jacques Garrigue 296fc05470 Merge olabl branch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-30 16:07:38 +00:00
Xavier Leroy cc0f32b054 Changement de la licence
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2553 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-11-17 18:59:06 +00:00
Xavier Leroy a0257345ce Ajout de list_remove (a mettre dans List?)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1999-02-04 10:32:27 +00:00
Xavier Leroy 4cb01ac06f Misc.lowercase -> String.uncapitalize
Misc.capitalize -> String.capitalize


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-10-31 16:03:49 +00:00
Xavier Leroy 2301d778e7 Renommage en Objective Caml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@782 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-30 14:53:58 +00:00
Jérôme Vouillon 7974a9d8b1 Extension objets.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@756 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-04-22 11:15:41 +00:00
Xavier Leroy 6daea9408f Ajout de Misc.replicate_list.
Misc.temp_file deplace vers Filename.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@588 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1996-01-04 12:51:11 +00:00
Xavier Leroy cb1ccd6d81 Fonctions testant les debordements lors d'une addition ou d'une soustraction.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@363 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-10-26 16:25:24 +00:00
Xavier Leroy e4066357b1 Ajout des notices de copyright
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@195 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-08-09 15:06:35 +00:00
Xavier Leroy 2ccd7f48fb Ajout de qques fonctions sur entiers pour le compilateur natif.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@25 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-06-05 13:44:14 +00:00
Xavier Leroy e57ef00576 Remplacement de Cset par Set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@20 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-05-30 13:36:40 +00:00
Xavier Leroy 997fb206a7 Printf.sprintf et String.concat dans stdlib
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-05-05 10:05:18 +00:00
Xavier Leroy 623e2fbc00 Ajout de Sys.file_exists
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-05-04 12:48:07 +00:00
Xavier Leroy 61bd8ace6b Passage a la version bootstrappee (franchissement du Rubicon)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1995-05-04 10:15:53 +00:00