13 Jun 2008 02:18
patch applied (hugs98): improve output of intermediate compilation results (from Dimitry Golubovsky)
Ross Paterson <ross <at> soi.city.ac.uk>
2008-06-13 00:18:41 GMT
2008-06-13 00:18:41 GMT
Thu Jun 12 16:06:45 PDT 2008 Ross Paterson <ross <at> soi.city.ac.uk> * improve output of intermediate compilation results (from Dimitry Golubovsky) 1. Adjusts the configure.ac script adding the --enable-extcore option which turns the DEBUG_SHOWSC flag on, thus producing of external Core is made possible 2. Creates a standalone program (corehugs) which is basically Hugs' main program with whole REPL part stripped off. All it does is forcing the +C option (generate intermediate core), and loading all source files (which causes Core output during compilation), then it exits. I also added a global flag to error.c that is incremented if at least one error message is output; this makes it a lot easier to return an error code from corehugs if something goes wrong at the compile phase. 3. Improves Core output making it more consistent: True and False are given correct module names (Hugs.Prelude), calls to primitives refer to actual modules where primitives are defined (it was all hardcoded to Prelude); also output of primitive declarations is added with each module that defines any primitives. The patch does not change any internal structures in the storage, and does not affect the interactive part of Hugs. I also wrote a parser which creates Yhc Core out of Hugs' output core files, but this is completely separate from the Hugs source tree. Implementation of these changes turns Hugs into a (pre-) compiler that may target multiple backends in addition to its own bytecode evaluator.(Continue reading)
RSS Feed