Commit ac341032 authored by Artem Alimarine's avatar Artem Alimarine

higher-order kinded types in generics

parent b1991e2c
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment