1. 21 Aug, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-08-21 16:04:43 by simonmar] · 684de20b
      simonmar authored
      Oops, I bungled the -no-recomp fix.  This probably had something to do
      with the fact that -no-recomp is perhaps the worst-named option in the
      history of compilers, and the internal variable used to store the
      value of -no-recomp actually stores (not -no-recomp), perhaps in an
      attempt to reverse the confusion generated by the obsurely named
      option.  In the end I figured I had a 50/50 chance of getting it
      right...
      684de20b
    • simonmar's avatar
      [project @ 2001-08-21 14:34:58 by simonmar] · dd8ab37f
      simonmar authored
      make -no-recomp work with --make
      dd8ab37f
  2. 19 Aug, 2001 1 commit
  3. 17 Aug, 2001 2 commits
    • apt's avatar
      [project @ 2001-08-17 17:18:51 by apt] · 1dfaee31
      apt authored
      How I spent my summer vacation.
      
      Primops
      -------
      
      The format of the primops.txt.pp file has been enhanced to allow
      (latex-style) primop descriptions to be included.  There is a new flag
      to genprimopcode that generates documentation including these
      descriptions. A first cut at descriptions of the more interesting
      primops has been made, and the file has been reordered a bit.
      
      31-bit words
      ------------
      
      The front end now can cope with the possibility of 31-bit (or even 30-bit)
      Int# and Word# types.  The only current use of this is to generate
      external .core files that can be translated into OCAML source files
      (OCAML uses a one-bit tag to distinguish integers from pointers).
      The only way to get this right now is by hand-defining the preprocessor
      symbol WORD_SIZE_IN_BITS, which is normally set automatically from
      the familiar WORD_SIZE_IN_BYTES.
      
      Just in case 31-bit words are used, we now have Int32# and Word32# primitive types
      and an associated family of operators, paralleling the existing 64-bit
      stuff.  Of course, none of the operators actually need to be implemented
      in the absence of a 31-bit backend.
      There has also been some minor re-jigging of the 32 vs. 64 bit stuff.
      See the description at the top of primops.txt.pp file for more details.
      Note that, for the first time, the *type* of a primop can now depend
      on the target word size.
      
      Also, the family of primops intToInt8#, intToInt16#, etc.
      have been renamed narrow8Int#, narrow16Int#, etc., to emphasize
      that they work on Int#'s and don't actually convert between types.
      
      Addresses
      ---------
      
      As another part of coping with the possibility of 31-bit ints,
      the addr2Int# and int2Addr# primops are now thoroughly deprecated
      (and not even defined in the 31-bit case) and all uses
      of them have been removed except from the (deprecated) module
      hslibs/lang/Addr
      
      Addr# should now be treated as a proper abstract type, and has these suitable operators:
      
      nullAddr# : Int# -> Addr# (ignores its argument; nullary primops cause problems at various places)
      plusAddr# :  Addr# -> Int# -> Addr#
      minusAddr : Addr# -> Addr# -> Int#
      remAddr# : Addr# -> Int# -> Int#
      
      Obviously, these don't allow completely arbitrary offsets if 31-bit ints are
      in use, but they should do for all practical purposes.
      
      It is also still possible to generate an address constant, and there is a built-in rule
      that makes use of this to remove the nullAddr# calls.
      
      Misc
      ----
      There is a new compile flag -fno-code that causes GHC to quit after generating .hi files
      and .core files (if requested) but before generating STG.
      
      Z-encoded names for tuples have been rationalized; e.g.,
      Z3H now means an unboxed 3-tuple, rather than an unboxed
      tuple with 3 commas (i.e., a 4-tuple)!
      
      Removed misc. litlits in hslibs/lang
      
      Misc. small changes to external core format.  The external core description
      has also been substantially updated, and incorporates the automatically-generated
      primop documentation; its in the repository at /papers/ext-core/core.tex.
      
      A little make-system addition to allow passing CPP options to compiler and
      library builds.
      1dfaee31
    • sof's avatar
      [project @ 2001-08-17 16:06:30 by sof] · d30f8fc1
      sof authored
      - have SysTools.FileOption take a prefix that is not to be transformed
        (this is to accommodate MS-style cmd-line options of the kind: "/out=foo.obj")
      - have users of Finder.mkHomeModuleLocn catch up with recent change to its type.
      d30f8fc1
  4. 16 Aug, 2001 1 commit
  5. 15 Aug, 2001 3 commits
  6. 10 Aug, 2001 1 commit
    • sof's avatar
      [project @ 2001-08-10 23:08:25 by sof] · 215dad7b
      sof authored
      Added SysTools.Option, which lets you identify what are
      file-path like options to SysTool.run<Foo>.
      
      Using this, we can now precisely control when to transform
      filepaths into a host-compatible format (i.e., we can DOSify
      just the right bits under Win32).
      215dad7b
  7. 03 Aug, 2001 1 commit
    • sof's avatar
      [project @ 2001-08-03 07:44:47 by sof] · 65142ed3
      sof authored
      Make dependency generation work a little bit better
      (stage1 goes through OK; yet to do a stage2, but
      thought I'd commit before I hit the sack).
      65142ed3
  8. 31 Jul, 2001 1 commit
  9. 24 Jul, 2001 1 commit
  10. 23 Jul, 2001 1 commit
  11. 19 Jul, 2001 1 commit
  12. 17 Jul, 2001 1 commit
    • rrt's avatar
      [project @ 2001-07-17 14:48:04 by rrt] · 544179c9
      rrt authored
      1. Make GHC work with paths and filenames containing spaces (hopefully).
      This is done by quoting all arguments sent to the shell. To avoid causing
      problems, this means that each argument in a list had *better* be a single
      argument, hence the next commit to PackageSrc.hs.
      
      2. undosify the path passed as the -h argument to unlit, to make unlit work
      on Windows again.
      
      3. Fix getExecDir for Windows (broken by previous changes to the meaning of
      -B).
      544179c9
  13. 11 Jul, 2001 3 commits
    • sof's avatar
      [project @ 2001-07-11 19:48:07 by sof] · 17629712
      sof authored
      Prev commit which tried to get rid of the 'ineffective CPP'
      stage broke an invariant/assumption made by DriverPipeline.genPipeline,
      I'm afraid.
      
      The invariant being that from the input filename to a compilation
      pipeline, the start stage/phase can be uniquely determined
      (via DriverPhases.startPhase). run_phase no longer guarantees
      this, its result filename may now be equal to the input filename.
      [This resulted in -M not working properly when -cpp wasn't also used].
      
      Patch this up by having the input filename to a compilation pipeline
      stage be tagged with the assumed suffix of the output. This is
      really just papering over the cracks, the proper way to tidy this
      up is to avoid having to do the two-stage compilation pipeline in
      Main.main.compileFile, i.e., reconsider how OPTIONS pragmas are
      handled. I decided not to try to do this now for fear of destabilising
      HEAD even further.
      17629712
    • sof's avatar
      [project @ 2001-07-11 14:50:49 by sof] · 65dda595
      sof authored
      run_phase: added tysig
      65dda595
    • sof's avatar
      [project @ 2001-07-11 01:27:04 by sof] · 2c4b2be6
      sof authored
      Do away with that 'ineffective CPP' malarkey. run_phase now returns
      the FilePath of its output file; in the event CPP isn't required,
      we then just return the input file. (The extra LINE pragma that
      the 'ineffective CPP' inserted was a NOP).
      
      Appears to speed things up a bit; mingw/Win32 builds no longer need to
      do a slow copyFile operation - other plats are saved from doing a
      System.system call.
      
      BTW, there's an opportunity to shorten the critical path for .hs files
      some in the driver: at the moment 'unlit' is run over all input.
      2c4b2be6
  14. 03 Jul, 2001 1 commit
  15. 29 Jun, 2001 1 commit
    • rrt's avatar
      [project @ 2001-06-29 12:58:20 by rrt] · 045a18db
      rrt authored
      Change the way that IO exceptions are handled and some associated details:
      
      1. In the top-level exception handler, don't treat IO exceptions as a panic,
      just print them out and stop.
      
      2. In the slurping routines SysTools.copy and the fake cpp in
      DriverPipeline, don't catch IO exceptions, just let them propagate.
      045a18db
  16. 27 Jun, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-06-27 16:38:17 by simonmar] · 47108330
      simonmar authored
      When we're in --interactive or --make mode, we don't even *look* for
      interface files in the home package.
      
      This means that cd'ing into fptools/ghc/lib/std and starting up GHCi
      Just Works, which is a good thing.  It also subsumes the previous hack
      about checking whether we're renaming a command-line expression before
      allowing a home interface to be loaded.
      
      The downside is that if you try to use a qualified name for a home
      module that's not loaded, you'll get a slightly less informative error
      message: "interface file not found" rather than "module not loaded",
      but this could be improved.
      47108330
    • simonpj's avatar
      [project @ 2001-06-27 10:35:48 by simonpj] · 567cd49a
      simonpj authored
      Add comment
      567cd49a
  17. 26 Jun, 2001 1 commit
  18. 25 Jun, 2001 1 commit
  19. 15 Jun, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-06-15 15:15:33 by simonmar] · 8878d049
      simonmar authored
      Restore an #ifdef mingw32_TARGET_OS that shouldn't have been removed
      (but do it better this time and don't use an arch-specific #ifdef).
      8878d049
    • simonpj's avatar
      [project @ 2001-06-15 08:29:57 by simonpj] · 972d6442
      simonpj authored
      Some tidying up
      
      * Remove CmStaticInfo
         - GhciMode moves to HscTypes
         - The package stuff moves to new module main/Packages.lhs
      
      [put any package-related stuff in the new module]
      
      * Add Outputable.docToSDoc
      972d6442
  20. 14 Jun, 2001 2 commits
    • simonpj's avatar
      [project @ 2001-06-14 12:50:05 by simonpj] · 16d5d1c7
      simonpj authored
      ----------------------
      	Installation packaging
      	----------------------
      
      GHC runs various system programs like
      	cp, touch
      	gcc, as, ld etc
      
      On Windows we plan to deliver these programs along with GHC,
      so we have to be careful about where to find them.
      
      This commit isolates all these dependencies in a single module
      
      	main/SysTools.lhs
      
      Most of the #ifdefery for mingw has moved into this module.
      There's some documentation in SysTools.lhs
      
      Along the way I did lots of other cleanups.  In particular
      
        * There is no more 'globbing' needed when calling runSomething
        * All file removal goes via the standard Directory.removeFile
        * TmpFiles.hs has gone; absorbed into SysTools
        * Some DynFlag stuff has moved from DriverFlags to CmdLineOpts
      
      
      Still to do:
      
        **	I'm a bit concerned that calling removeFile one at a time
      	when deleting masses of split-object files is going to be
      	rather slow
      
        **	GHC now expects to find split,mangle,unlit in
      		libdir/extra-bin
      	instead of just
      		libdir
      
      	So something needs to change in the Unix installation scripts
      
        **    The "ineffective C preprocessor" is a perversion and should die
      16d5d1c7
    • simonmar's avatar
      [project @ 2001-06-14 11:46:55 by simonmar] · 8245241e
      simonmar authored
      just move some code around.
      8245241e
  21. 08 Jun, 2001 1 commit
  22. 07 Jun, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-06-07 11:03:07 by simonmar] · c95b8662
      simonmar authored
      First part of support for hierarchical module names:
      
         - the Finder now searches all possible paths when looking for
           a source file or .hi file.  I've removed the caching because
           now we have to search in subdirectories of each path option,
           and it was dubious whether the cache was actually helping.
      
         - the compilation manager now outputs a warning if it can't find
           the source for a given module, only the .hi file.  Previously
           this caused a cryptic error message when we attempted to call
           getModificationTime on the non-existent source file.
      c95b8662
  23. 01 Jun, 2001 1 commit
  24. 31 May, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-05-31 11:32:25 by simonmar] · e0a941b9
      simonmar authored
      - add -hidir flag to control the destination for .hi files when doing
        multiple compilations (matches -odir).
      
      - change the ml_hi_file component of ModuleLocation from Maybe FilePath to
        FilePath.  We never made use of its Maybeness.
      
      - clear out some unused code from the Hsc phase of run_phase and clean up
        a bit.  Fix a bug with the -ohi option at the same time (I don't think
        it works in 5.xx.x before this patch).
      e0a941b9
  25. 29 May, 2001 1 commit
  26. 28 May, 2001 1 commit
    • sof's avatar
      [project @ 2001-05-28 03:31:19 by sof] · 4cef3202
      sof authored
      Misc minor changes to integrate GHC a little bit better on Win32 platforms.
      Specifically, the commit does the following (assuming you've configured
      fptools/ with the option --enable-minimal-unix-deps on a mingw platform):
      
       * when GHC uses System.system, it expects an MSDOS command processor to
         interpret the command. This implies that 'normal' UNIX shell utils will
         no longer be used, but substituted with MSDOS equivalents.
       * the GHC backend relies on gcc and perl to handle .s/.hc/.o/.a files. GHC
         will now assume that these all live in one 'tool directory', making it
         easier to bundle these backend tools with GHC.
      
      The upshot of these changes is that it is now possible for the user not to
      have to install cygwin prior to installing GHC (as the upcoming ghc-win32
      binary release will prove).
      4cef3202
  27. 25 May, 2001 1 commit
  28. 24 May, 2001 1 commit
  29. 09 May, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-05-09 09:38:18 by simonmar] · 02edb760
      simonmar authored
      Add a new option: -hcsuf <suffix> which renames the .hc suffix to
      <suffix> for this compilation, in the same way as -osuf and -hisuf.
      
      To even things up, remove partial support for '-ohi -', which
      allegedly dumped the .hi file to stdout but in reality never worked.
      It's a strange thing to want to do anyway, but in any case you could
      always say '-ohi /dev/stdout', or even 'ghc Foo.hs && cat Foo.hi'.
      02edb760
  30. 08 May, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-05-08 11:07:30 by simonmar] · c7c6aea8
      simonmar authored
      oops, remove debugging output
      c7c6aea8
    • simonmar's avatar
      [project @ 2001-05-08 10:58:48 by simonmar] · b8b47abe
      simonmar authored
      Add
      
      	DriverPhases.haskellish_src_suffix :: String -> Bool
      	DriverPhases.haskellish_src_file   :: String -> Bool
      
      which return True for suffixes of Haskell source files only.  The
      existing haskellish_suffix and haskellish_file return True also for
      .raw_s and .hc files.
      
      We use these instead of haskellish_file in Main.main when deciding
      whether to preprocess a file.
      
      Fixes: compilation of .raw_s files, and potential bugs with
      compilation of .hc files.
      b8b47abe