aboutsummaryrefslogtreecommitdiff
path: root/main/compile.icl
diff options
context:
space:
mode:
authoralimarin2001-10-19 12:17:58 +0000
committeralimarin2001-10-19 12:17:58 +0000
commit75e6cc92a998de85488603aa93db013254798936 (patch)
treea3222164f4821a9f004ac35103a9a7f3a3b83840 /main/compile.icl
parenthigher-order kinded types in generics (diff)
higher-order kinded types in generics
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@872 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'main/compile.icl')
-rw-r--r--main/compile.icl12
1 files changed, 8 insertions, 4 deletions
diff --git a/main/compile.icl b/main/compile.icl
index b40197f..bd114d6 100644
--- a/main/compile.icl
+++ b/main/compile.icl
@@ -5,6 +5,7 @@ import frontend
import backendinterface
import filesystem, CoclSystemDependent
import portToNewSyntax
+import compilerSwitches
//import RWSDebug
:: CoclOptions =
@@ -18,6 +19,7 @@ import portToNewSyntax
, compile_for_dynamics :: !Bool
, support_generics :: !Bool
, compile_with_fusion :: !Bool
+ , compile_with_generics :: !Bool
}
InitialCoclOptions =
@@ -31,6 +33,7 @@ InitialCoclOptions =
, compile_for_dynamics = False
, support_generics = False
, compile_with_fusion = False
+ , compile_with_generics = False
}
:: DclCache = {
@@ -81,11 +84,12 @@ parseCommandLine ["-id",compiler_id_string : args] options
parseCommandLine [arg1=:"-dynamics":args] options
// generates for each .icl module a .tcl file (which contains the type information for that module)
= parseCommandLine args {options & compile_for_dynamics = True}
-parseCommandLine [arg1=:"-generics":args] options
- = parseCommandLine args {options & support_generics = True}
parseCommandLine [arg1=:"-fusion":args] options
// switch on fusion transformations
- = parseCommandLine args {options & compile_with_fusion = True}
+ = parseCommandLine args {options & compile_with_fusion = True}
+parseCommandLine ["-generics":args] options
+ // enable generics
+ = parseCommandLine args (SwitchGenerics {options & compile_with_generics = True} options)
parseCommandLine [arg : args] options
| arg.[0] == '-'
# (args,modules,options)= parseCommandLine args options
@@ -184,7 +188,7 @@ compileModule options commandLineArgs {dcl_modules,functions_and_macros,predef_s
# ({boxed_ident=moduleIdent}, hash_table) = putIdentInHashTable options.moduleName IC_Module hash_table
# list_inferred_types = if (isMember "-lt" commandLineArgs) (Yes (not (isMember "-lattr" commandLineArgs))) No
# (optionalSyntaxTree,cached_functions_and_macros,cached_dcl_mods,n_functions_and_macros_in_dcl_modules,main_dcl_module_n,predef_symbols, hash_table, files, error, io, out,tcl_file,heaps)
- = frontEndInterface {feo_up_to_phase=FrontEndPhaseAll,feo_generics=False,feo_fusion=options.compile_with_fusion} moduleIdent options.searchPaths dcl_modules functions_and_macros list_inferred_types predef_symbols hash_table fmodificationtime files error io out tcl_file heaps
+ = frontEndInterface {feo_up_to_phase=FrontEndPhaseAll,feo_generics=options.compile_with_generics,feo_fusion=options.compile_with_fusion} moduleIdent options.searchPaths dcl_modules functions_and_macros list_inferred_types predef_symbols hash_table fmodificationtime files error io out tcl_file heaps
# unique_copy_of_predef_symbols={predef_symbol\\predef_symbol<-:predef_symbols}
# (closed, files)
= closeTclFile tcl_file files