patch applied (hugs98): improve output of intermediate compilation results (from Dimitry Golubovsky)

Ross Paterson ross at soi.city.ac.uk
Thu Jun 12 20:18:41 EDT 2008


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.

    M ./configure.ac +12
    M ./src/Makefile.in -5 +12
    M ./src/MkDepend.in -1 +4
    M ./src/MkInstal.in -4 +4
    M ./src/bcc32/Makefile -87 +213
    M ./src/compiler.c -1 +36
    A ./src/corehugs.c
    M ./src/dotnet/Makefile -1 +4
    M ./src/errors.c +2
    M ./src/errors.h -1 +3
    M ./src/msc/Makefile -113 +87
    M ./src/output.c -8 +8
    M ./src/winhugs/Makefile -1 +4

View patch online:
http://darcs.haskell.org/hugs98/_darcs/patches/20080612230645-b47d3-78a0c97e576ec137de1e3374c82d81cb4bf24e5d.gz


More information about the Cvs-hugs mailing list