package libsail
Module Libsail.Initial_checkSource
Initial desugaring pass over AST after parsing
Options
Generate undefined_T functions for every type T. False by default.
Generate faster undefined_T functions. Rather than generating functions that allow for the undefined values of enums and variants to be picked at runtime using a RNG or similar, this creates undefined_T functions for those types that simply return a specific member of the type chosen at compile time, which is much faster. These functions don't have the right effects, so the -no_effects flag may be needed if this is true. False by default.
Allow # in identifiers when set, much like the GHC option of the same name
When true enums can be automatically casted to range types and back. Otherwise generated T_of_num and num_of_T functions must be manually used for each enum T
This is a bit of a hack right now - it ensures that the undefiend builtins (undefined_vector etc), only get added to the AST once. The original assumption in sail is that the whole AST gets processed at once (therefore they could only get added once), and this isn't true any more with the interpreter. This needs to be public so the interpreter can set it back to false if it unloads all the loaded files.
Val specs of undefined functions for builtin types that get added to the AST if opt_undefined_gen is set (minus those functions that already exist in the AST).
Desugar and process AST
If the generate flag is false, then we won't generate any auxilliary definitions, like the initialize_registers function
Parsing expressions and definitions from strings
val ast_of_def_string_with :
(string * int * int * int) ->
(Parse_ast.def list -> Parse_ast.def list) ->
string ->
unit Ast_defs.astParsing files
Parse a file into a sequence of comments and a parse AST