Permalink
Browse files

WIP

  • Loading branch information...
1 parent 5f97778 commit 097e87450c1afacaa5fceb75abdf84f44f584975 @let-def let-def committed Jan 10, 2013
Showing with 128 additions and 1,763 deletions.
  1. +6 −1 Makefile
  2. +3 −3 _tags
  3. +0 −45 asttypes.mli
  4. +0 −100 clflags.ml
  5. +0 −83 clflags.mli
  6. +0 −125 config.ml
  7. +0 −123 config.mli
  8. +0 −286 location.ml
  9. +0 −79 location.mli
  10. +0 −43 longident.ml
  11. +0 −24 longident.mli
  12. +2 −2 myocamlbuild.ml
  13. +0 −307 parsetree.mli
  14. +0 −25 terminfo.ml
  15. +0 −25 terminfo.mli
  16. +66 −4 test.ml
  17. +46 −3 typer.ml
  18. +5 −0 typer.mli
  19. +0 −410 warnings.ml
  20. +0 −75 warnings.mli
View
@@ -1,5 +1,10 @@
-all:
+
+all: fake-ocamlbuild
ocamlbuild -use-ocamlfind test.byte
clean:
ocamlbuild -clean
+
+FAKE_CMI = location,asttypes,longident,parsetree,clflags
+fake-ocamlbuild:
+ ln -sf $$(ocamlfind query compiler-libs.bytecomp)/{$(FAKE_CMI)}.cmi _build/
View
6 _tags
@@ -1,5 +1,5 @@
-true: use_menhir, use_ocamlfind, use_menhir_table
+true: use_menhir, use_menhir_table
-true: package(menhirLib)
+true: package(menhirLib), package(compiler-libs.bytecomp)
-<outline_parser.*>: ext_tokens
+<outline_parser.*>: ext_tokens
View
@@ -1,45 +0,0 @@
-(***********************************************************************)
-(* *)
-(* OCaml *)
-(* *)
-(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
-(* *)
-(* Copyright 1996 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
-(***********************************************************************)
-
-(* $Id: asttypes.mli 12511 2012-05-30 13:29:48Z lefessan $ *)
-
-(* Auxiliary a.s.t. types used by parsetree and typedtree. *)
-
-type constant =
- Const_int of int
- | Const_char of char
- | Const_string of string
- | Const_float of string
- | Const_int32 of int32
- | Const_int64 of int64
- | Const_nativeint of nativeint
-
-type rec_flag = Nonrecursive | Recursive | Default
-
-type direction_flag = Upto | Downto
-
-type private_flag = Private | Public
-
-type mutable_flag = Immutable | Mutable
-
-type virtual_flag = Virtual | Concrete
-
-type override_flag = Override | Fresh
-
-type closed_flag = Closed | Open
-
-type label = string
-
-type 'a loc = 'a Location.loc = {
- txt : 'a;
- loc : Location.t;
-}
View
@@ -1,100 +0,0 @@
-(***********************************************************************)
-(* *)
-(* OCaml *)
-(* *)
-(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
-(* *)
-(* Copyright 1996 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
-(***********************************************************************)
-
-(* $Id: clflags.ml 12511 2012-05-30 13:29:48Z lefessan $ *)
-
-(* Command-line parameters *)
-
-let objfiles = ref ([] : string list) (* .cmo and .cma files *)
-and ccobjs = ref ([] : string list) (* .o, .a, .so and -cclib -lxxx *)
-and dllibs = ref ([] : string list) (* .so and -dllib -lxxx *)
-
-let compile_only = ref false (* -c *)
-and output_name = ref (None : string option) (* -o *)
-and include_dirs = ref ([] : string list)(* -I *)
-and no_std_include = ref false (* -nostdlib *)
-and print_types = ref false (* -i *)
-and make_archive = ref false (* -a *)
-and debug = ref false (* -g *)
-and fast = ref false (* -unsafe *)
-and link_everything = ref false (* -linkall *)
-and custom_runtime = ref false (* -custom *)
-and output_c_object = ref false (* -output-obj *)
-and ccopts = ref ([] : string list) (* -ccopt *)
-and classic = ref false (* -nolabels *)
-and nopervasives = ref false (* -nopervasives *)
-and preprocessor = ref(None : string option) (* -pp *)
-let annotations = ref false (* -annot *)
-let binary_annotations = ref false (* -annot *)
-and use_threads = ref false (* -thread *)
-and use_vmthreads = ref false (* -vmthread *)
-and noassert = ref false (* -noassert *)
-and verbose = ref false (* -verbose *)
-and noprompt = ref false (* -noprompt *)
-and nopromptcont = ref false (* -nopromptcont *)
-and init_file = ref (None : string option) (* -init *)
-and use_prims = ref "" (* -use-prims ... *)
-and use_runtime = ref "" (* -use-runtime ... *)
-and principal = ref false (* -principal *)
-and recursive_types = ref false (* -rectypes *)
-and strict_sequence = ref false (* -strict-sequence *)
-and applicative_functors = ref true (* -no-app-funct *)
-and make_runtime = ref false (* -make-runtime *)
-and gprofile = ref false (* -p *)
-and c_compiler = ref (None: string option) (* -cc *)
-and no_auto_link = ref false (* -noautolink *)
-and dllpaths = ref ([] : string list) (* -dllpath *)
-and make_package = ref false (* -pack *)
-and for_package = ref (None: string option) (* -for-pack *)
-and error_size = ref 500 (* -error-size *)
-let dump_parsetree = ref false (* -dparsetree *)
-and dump_rawlambda = ref false (* -drawlambda *)
-and dump_lambda = ref false (* -dlambda *)
-and dump_clambda = ref false (* -dclambda *)
-and dump_instr = ref false (* -dinstr *)
-
-let keep_asm_file = ref false (* -S *)
-let optimize_for_speed = ref true (* -compact *)
-
-and dump_cmm = ref false (* -dcmm *)
-let dump_selection = ref false (* -dsel *)
-let dump_live = ref false (* -dlive *)
-let dump_spill = ref false (* -dspill *)
-let dump_split = ref false (* -dsplit *)
-let dump_scheduling = ref false (* -dscheduling *)
-let dump_interf = ref false (* -dinterf *)
-let dump_prefer = ref false (* -dprefer *)
-let dump_regalloc = ref false (* -dalloc *)
-let dump_reload = ref false (* -dreload *)
-let dump_scheduling = ref false (* -dscheduling *)
-let dump_linear = ref false (* -dlinear *)
-let keep_startup_file = ref false (* -dstartup *)
-let dump_combine = ref false (* -dcombine *)
-
-let native_code = ref false (* set to true under ocamlopt *)
-let inline_threshold = ref 10
-
-let dont_write_files = ref false (* set to true under ocamldoc *)
-
-let std_include_flag prefix =
- if !no_std_include then ""
- else (prefix ^ (Filename.quote Config.standard_library))
-;;
-
-let std_include_dir () =
- if !no_std_include then [] else [Config.standard_library]
-;;
-
-let shared = ref false (* -shared *)
-let dlcode = ref true (* not -nodynlink *)
-
-let runtime_variant = ref "";; (* -runtime-variant *)
View
@@ -1,83 +0,0 @@
-(***********************************************************************)
-(* *)
-(* OCaml *)
-(* *)
-(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
-(* *)
-(* Copyright 2005 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
-(***********************************************************************)
-
-(* $Id: clflags.mli 12800 2012-07-30 18:59:07Z doligez $ *)
-
-val objfiles : string list ref
-val ccobjs : string list ref
-val dllibs : string list ref
-val compile_only : bool ref
-val output_name : string option ref
-val include_dirs : string list ref
-val no_std_include : bool ref
-val print_types : bool ref
-val make_archive : bool ref
-val debug : bool ref
-val fast : bool ref
-val link_everything : bool ref
-val custom_runtime : bool ref
-val output_c_object : bool ref
-val ccopts : string list ref
-val classic : bool ref
-val nopervasives : bool ref
-val preprocessor : string option ref
-val annotations : bool ref
-val binary_annotations : bool ref
-val use_threads : bool ref
-val use_vmthreads : bool ref
-val noassert : bool ref
-val verbose : bool ref
-val noprompt : bool ref
-val nopromptcont : bool ref
-val init_file : string option ref
-val use_prims : string ref
-val use_runtime : string ref
-val principal : bool ref
-val recursive_types : bool ref
-val strict_sequence : bool ref
-val applicative_functors : bool ref
-val make_runtime : bool ref
-val gprofile : bool ref
-val c_compiler : string option ref
-val no_auto_link : bool ref
-val dllpaths : string list ref
-val make_package : bool ref
-val for_package : string option ref
-val error_size : int ref
-val dump_parsetree : bool ref
-val dump_rawlambda : bool ref
-val dump_lambda : bool ref
-val dump_clambda : bool ref
-val dump_instr : bool ref
-val keep_asm_file : bool ref
-val optimize_for_speed : bool ref
-val dump_cmm : bool ref
-val dump_selection : bool ref
-val dump_live : bool ref
-val dump_spill : bool ref
-val dump_split : bool ref
-val dump_interf : bool ref
-val dump_prefer : bool ref
-val dump_regalloc : bool ref
-val dump_reload : bool ref
-val dump_scheduling : bool ref
-val dump_linear : bool ref
-val keep_startup_file : bool ref
-val dump_combine : bool ref
-val native_code : bool ref
-val inline_threshold : int ref
-val dont_write_files : bool ref
-val std_include_flag : string -> string
-val std_include_dir : unit -> string list
-val shared : bool ref
-val dlcode : bool ref
-val runtime_variant : string ref
View
125 config.ml
@@ -1,125 +0,0 @@
-(***********************************************************************)
-(* *)
-(* OCaml *)
-(* *)
-(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
-(* *)
-(* Copyright 1996 Institut National de Recherche en Informatique et *)
-(* en Automatique. All rights reserved. This file is distributed *)
-(* under the terms of the Q Public License version 1.0. *)
-(* *)
-(***********************************************************************)
-
-(* $Id: config.mlp 12511 2012-05-30 13:29:48Z lefessan $ *)
-
-(***********************************************************************)
-(** **)
-(** WARNING WARNING WARNING **)
-(** **)
-(** When you change this file, you must make the parallel change **)
-(** in config.mlbuild **)
-(** **)
-(***********************************************************************)
-
-
-(* The main OCaml version string has moved to ../VERSION *)
-let version = Sys.ocaml_version
-
-let standard_library_default = "/home/def/Local/ocaml-ty/lib/ocaml"
-
-let standard_library =
- try
- Sys.getenv "OCAMLLIB"
- with Not_found ->
- try
- Sys.getenv "CAMLLIB"
- with Not_found ->
- standard_library_default
-
-let standard_runtime = "/home/def/Local/ocaml-ty/bin/ocamlrun"
-let ccomp_type = "cc"
-let bytecomp_c_compiler = "gcc -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC"
-let bytecomp_c_libraries = "-lm -ldl -lcurses -lpthread"
-let native_c_compiler = "gcc -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT"
-let native_c_libraries = "-lm -ldl"
-let native_pack_linker = "ld -r -o "
-let ranlib = "ranlib"
-let ar = "ar"
-let cc_profile = "-pg"
-let mkdll = "gcc -shared"
-let mkexe = "gcc"
-let mkmaindll = "gcc -shared"
-
-let exec_magic_number = "Caml1999X008"
-and cmi_magic_number = "Caml1999I014"
-and cmo_magic_number = "Caml1999O007"
-and cma_magic_number = "Caml1999A008"
-and cmx_magic_number = "Caml1999Y011"
-and cmxa_magic_number = "Caml1999Z010"
-and ast_impl_magic_number = "Caml1999M015"
-and ast_intf_magic_number = "Caml1999N014"
-and cmxs_magic_number = "Caml2007D001"
-and cmt_magic_number = "Caml2012T001"
-
-let load_path = ref ([] : string list)
-
-let interface_suffix = ref ".mli"
-
-let max_tag = 245
-(* This is normally the same as in obj.ml, but we have to define it
- separately because it can differ when we're in the middle of a
- bootstrapping phase. *)
-let lazy_tag = 246
-
-let max_young_wosize = 256
-let stack_threshold = 256 (* see byterun/config.h *)
-
-let architecture = "amd64"
-let model = "default"
-let system = "linux"
-
-let asm = "as"
-let asm_cfi_supported = true
-
-let ext_obj = ".o"
-let ext_asm = ".s"
-let ext_lib = ".a"
-let ext_dll = ".so"
-
-let default_executable_name =
- match Sys.os_type with
- "Unix" -> "a.out"
- | "Win32" | "Cygwin" -> "camlprog.exe"
- | _ -> "camlprog"
-
-let systhread_supported = true;;
-
-let print_config oc =
- let p name valu = Printf.fprintf oc "%s: %s\n" name valu in
- let p_bool name valu = Printf.fprintf oc "%s: %B\n" name valu in
- p "version" version;
- p "standard_library_default" standard_library_default;
- p "standard_library" standard_library;
- p "standard_runtime" standard_runtime;
- p "ccomp_type" ccomp_type;
- p "bytecomp_c_compiler" bytecomp_c_compiler;
- p "bytecomp_c_libraries" bytecomp_c_libraries;
- p "native_c_compiler" native_c_compiler;
- p "native_c_libraries" native_c_libraries;
- p "native_pack_linker" native_pack_linker;
- p "ranlib" ranlib;
- p "cc_profile" cc_profile;
- p "architecture" architecture;
- p "model" model;
- p "system" system;
- p "asm" asm;
- p_bool "asm_cfi_supported" asm_cfi_supported;
- p "ext_obj" ext_obj;
- p "ext_asm" ext_asm;
- p "ext_lib" ext_lib;
- p "ext_dll" ext_dll;
- p "os_type" Sys.os_type;
- p "default_executable_name" default_executable_name;
- p_bool "systhread_supported" systhread_supported;
- flush oc;
-;;
Oops, something went wrong.

0 comments on commit 097e874

Please sign in to comment.