瀏覽代碼

Remove unused using (dune warnings)

Rudy Ges 1 年之前
父節點
當前提交
1f553c5bd7

+ 0 - 1
src/context/common.ml

@@ -16,7 +16,6 @@
 	along with this program; if not, write to the Free Software
 	along with this program; if not, write to the Free Software
 	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 	Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *)
  *)
-open Extlib_leftovers
 open Ast
 open Ast
 open Type
 open Type
 open Globals
 open Globals

+ 0 - 1
src/context/sourcemaps.ml

@@ -1,6 +1,5 @@
 open Extlib_leftovers
 open Extlib_leftovers
 open Globals
 open Globals
-open Gctx
 
 
 (**
 (**
 	Characters used for base64 VLQ encoding
 	Characters used for base64 VLQ encoding

+ 1 - 4
src/generators/cpp/cppAst.ml

@@ -1,7 +1,4 @@
-open Extlib_leftovers
-open Ast
 open Type
 open Type
-open Error
 open Globals
 open Globals
 
 
 type tcpp =
 type tcpp =
@@ -154,4 +151,4 @@ and tcpp_expr_expr =
   | CppCastObjC of tcppexpr * tclass
   | CppCastObjC of tcppexpr * tclass
   | CppCastObjCBlock of tcppexpr * tcpp list * tcpp
   | CppCastObjCBlock of tcppexpr * tcpp list * tcpp
   | CppCastProtocol of tcppexpr * tclass
   | CppCastProtocol of tcppexpr * tclass
-  | CppCastNative of tcppexpr
+  | CppCastNative of tcppexpr

+ 1 - 3
src/generators/cpp/cppAstTools.ml

@@ -1,7 +1,5 @@
-open Extlib_leftovers
 open Ast
 open Ast
 open Type
 open Type
-open Error
 open Globals
 open Globals
 open CppAst
 open CppAst
 open CppTypeUtils
 open CppTypeUtils
@@ -726,4 +724,4 @@ let enum_getter_type t =
   | TCppScalar "int"  -> "Int"
   | TCppScalar "int"  -> "Int"
   | TCppScalar "bool"  -> "Bool"
   | TCppScalar "bool"  -> "Bool"
   | TCppScalar x  -> x
   | TCppScalar x  -> x
-  | _  -> "Object"
+  | _  -> "Object"

+ 1 - 6
src/generators/cpp/cppContext.ml

@@ -1,9 +1,4 @@
-open Extlib_leftovers
-open Ast
 open Gctx
 open Gctx
-open Type
-open Error
-open Globals
 open CppAstTools
 open CppAstTools
 
 
 (* CPP code generation context *)
 (* CPP code generation context *)
@@ -98,4 +93,4 @@ let is_gc_element ctx member_type =
 
 
 let strip_file ctx file = match Gctx.defined ctx Define.AbsolutePath with
 let strip_file ctx file = match Gctx.defined ctx Define.AbsolutePath with
   | true -> Path.get_full_path file
   | true -> Path.get_full_path file
-  | false -> ctx.class_paths#relative_path file
+  | false -> ctx.class_paths#relative_path file

+ 1 - 5
src/generators/cpp/cppExprUtils.ml

@@ -1,8 +1,4 @@
-open Extlib_leftovers
-open Ast
 open Type
 open Type
-open Error
-open Globals
 
 
 let rec remove_parens expression =
 let rec remove_parens expression =
   match expression.eexpr with
   match expression.eexpr with
@@ -20,4 +16,4 @@ let rec remove_parens_cast expression =
 let is_static_access obj =
 let is_static_access obj =
   match (remove_parens obj).eexpr with
   match (remove_parens obj).eexpr with
   | TTypeExpr _ -> true
   | TTypeExpr _ -> true
-  | _ -> false
+  | _ -> false

+ 0 - 2
src/generators/cpp/cppRetyper.ml

@@ -1,9 +1,7 @@
-open Extlib_leftovers
 open Ast
 open Ast
 open Type
 open Type
 open Error
 open Error
 open Globals
 open Globals
-open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
 open CppAst
 open CppAst
 open CppAstTools
 open CppAstTools

+ 1 - 6
src/generators/cpp/cppSourceWriter.ml

@@ -1,9 +1,4 @@
-open Extlib_leftovers
-open Ast
 open Gctx
 open Gctx
-open Type
-open Error
-open Globals
 open CppStrings
 open CppStrings
 open CppAstTools
 open CppAstTools
 open CppTypeUtils
 open CppTypeUtils
@@ -185,4 +180,4 @@ let new_placed_cpp_file common_ctx class_path =
       ( base_dir ^ "/src/" ^ ( String.concat "-" (fst class_path) ) ^ "-" ^
       ( base_dir ^ "/src/" ^ ( String.concat "-" (fst class_path) ) ^ "-" ^
       (snd class_path) ^ (source_file_extension common_ctx) )
       (snd class_path) ^ (source_file_extension common_ctx) )
   end else
   end else
-    new_cpp_file common_ctx common_ctx.file class_path
+    new_cpp_file common_ctx common_ctx.file class_path

+ 1 - 5
src/generators/cpp/cppTypeUtils.ml

@@ -1,11 +1,7 @@
 (* Various helper functions to run checks on haxe classes and various other ast types *)
 (* Various helper functions to run checks on haxe classes and various other ast types *)
 (* functions in here operate on standard haxe ast types, not gencpp ast types *)
 (* functions in here operate on standard haxe ast types, not gencpp ast types *)
 
 
-open Extlib_leftovers
-open Ast
 open Type
 open Type
-open Error
-open Globals
 
 
 let follow = Abstract.follow_with_abstracts
 let follow = Abstract.follow_with_abstracts
 
 
@@ -354,4 +350,4 @@ let class_name class_def =
   let nativeGen       = Meta.has Meta.NativeGen class_def.cl_meta in
   let nativeGen       = Meta.has Meta.NativeGen class_def.cl_meta in
   class_path ^ if nativeGen then "" else "_obj"
   class_path ^ if nativeGen then "" else "_obj"
 
 
-let class_pointer class_def = "::hx::ObjectPtr< " ^ class_name class_def ^ " >"
+let class_pointer class_def = "::hx::ObjectPtr< " ^ class_name class_def ^ " >"

+ 0 - 2
src/generators/cpp/gen/cppCppia.ml

@@ -1,4 +1,3 @@
-open Extlib_leftovers
 open Ast
 open Ast
 open Type
 open Type
 open Error
 open Error
@@ -7,7 +6,6 @@ open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
 open CppAst
 open CppAst
 open CppAstTools
 open CppAstTools
-open CppSourceWriter
 open CppContext
 open CppContext
 
 
 let cpp_type_of = CppRetyper.cpp_type_of
 let cpp_type_of = CppRetyper.cpp_type_of

+ 1 - 2
src/generators/cpp/gen/cppGen.ml

@@ -4,7 +4,6 @@ open Type
 open Error
 open Error
 open Globals
 open Globals
 open CppStrings
 open CppStrings
-open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
 open CppAst
 open CppAst
 open CppAstTools
 open CppAstTools
@@ -2045,4 +2044,4 @@ let dynamic_functions class_def =
         when is_dynamic_haxe_method field ->
         when is_dynamic_haxe_method field ->
           keyword_remap field.cf_name :: result
           keyword_remap field.cf_name :: result
       | _ -> result)
       | _ -> result)
-    [] class_def.cl_ordered_fields
+    [] class_def.cl_ordered_fields

+ 1 - 2
src/generators/cpp/gen/cppGenClassHeader.ml

@@ -3,7 +3,6 @@ open Type
 open Error
 open Error
 open Globals
 open Globals
 open CppStrings
 open CppStrings
-open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
 open CppAst
 open CppAst
 open CppAstTools
 open CppAstTools
@@ -549,4 +548,4 @@ let generate baseCtx class_def =
 
 
   end_header_file output_h def_string;
   end_header_file output_h def_string;
 
 
-  h_file#close
+  h_file#close

+ 1 - 2
src/generators/cpp/gen/cppGenClassImplementation.ml

@@ -3,7 +3,6 @@ open Type
 open Error
 open Error
 open Globals
 open Globals
 open CppStrings
 open CppStrings
-open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
 open CppAst
 open CppAst
 open CppAstTools
 open CppAstTools
@@ -1389,4 +1388,4 @@ let generate baseCtx class_def =
      ^ "_delegate alloc] initWithImplementation:inImplementation.mPtr];\n");
      ^ "_delegate alloc] initWithImplementation:inImplementation.mPtr];\n");
     output_cpp "}\n\n");
     output_cpp "}\n\n");
 
 
-  cpp_file#close
+  cpp_file#close

+ 0 - 6
src/generators/cpp/gen/cppGenEnum.ml

@@ -1,11 +1,5 @@
-open Ast
 open Type
 open Type
-open Error
-open Globals
 open CppStrings
 open CppStrings
-open CppExprUtils
-open CppTypeUtils
-open CppAst
 open CppAstTools
 open CppAstTools
 open CppSourceWriter
 open CppSourceWriter
 open CppContext
 open CppContext

+ 0 - 6
src/generators/cpp/gen/cppReferences.ml

@@ -1,13 +1,7 @@
-open Ast
 open Type
 open Type
-open Error
-open Globals
 open CppStrings
 open CppStrings
-open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
-open CppAst
 open CppAstTools
 open CppAstTools
-open CppSourceWriter
 open CppContext
 open CppContext
 
 
 (*
 (*

+ 1 - 3
src/generators/gencpp.ml

@@ -22,9 +22,7 @@ open Type
 open Error
 open Error
 open Globals
 open Globals
 open CppStrings
 open CppStrings
-open CppExprUtils
 open CppTypeUtils
 open CppTypeUtils
-open CppAst
 open CppAstTools
 open CppAstTools
 open CppSourceWriter
 open CppSourceWriter
 open CppContext
 open CppContext
@@ -399,4 +397,4 @@ let generate common_ctx =
    end else begin
    end else begin
       let ctx = new_context common_ctx debug_level (ref PMap.empty) (create_member_types common_ctx) in
       let ctx = new_context common_ctx debug_level (ref PMap.empty) (create_member_types common_ctx) in
       generate_source ctx
       generate_source ctx
-   end
+   end

+ 0 - 1
src/generators/genswf.ml

@@ -24,7 +24,6 @@ open Error
 open Gctx
 open Gctx
 open Ast
 open Ast
 open Globals
 open Globals
-open NativeLibraries
 
 
 let tag ?(ext=false) d = {
 let tag ?(ext=false) d = {
 	tid = 0;
 	tid = 0;

+ 0 - 1
src/typing/macroContext.ml

@@ -22,7 +22,6 @@ open DisplayTypes.DisplayMode
 open Common
 open Common
 open Type
 open Type
 open Typecore
 open Typecore
-open Resolution
 open Error
 open Error
 open Globals
 open Globals