1. 15 Mar, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-03-15 11:26:27 by simonmar] · cf2aab8a
      simonmar authored
      Do a better job of telling the user whether we're interpreting a
      module or using an existing object file.
      
      eg.
      
         Main> :load A
         Skipping  D                ( D.hs, D.o )
         Compiling C                ( C.hs, interpreted )
         Skipping  B                ( B.hs, B.o )
         Compiling Main             ( A.hs, interpreted )
         Main>
      cf2aab8a
  2. 14 Mar, 2001 1 commit
  3. 13 Mar, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-03-13 17:08:36 by simonmar] · e9866166
      simonmar authored
      fix up for GHCi
      e9866166
    • simonmar's avatar
      [project @ 2001-03-13 12:50:29 by simonmar] · 10cbc75d
      simonmar authored
      Some rearrangements that Simon & I have been working on recently:
      
          - CoreSat is now CorePrep, and is a general "prepare-for-code-
            generation" pass.  It does cloning, saturation of constructors &
            primops, A-normal form, and a couple of other minor fiddlings.
      
          - CoreTidy no longer does cloning, and minor fiddlings.  It doesn't
            need the unique supply any more, so that's removed.
      
          - CoreToStg now collects CafInfo and the list of CafRefs for each
            binding.  The SRT pass is much simpler now.
      
          - IdInfo now has a CgInfo field for "code generator info".  It currently
            contains arity (the actual code gen arity which affects the calling
            convention as opposed to the ArityInfo which is a measure of how
            many arguments the Id can be applied to before it does any work), and
            CafInfo.
      
            Previously we overloaded the ArityInfo field to contain both
            codegen arity and simplifier arity.  Things are cleaner now.
      
          - CgInfo is collected by CoreToStg, and passed back into CoreTidy in
            a loop.  The compiler will complain rather than going into a black
            hole if the CgInfo is pulled on too early.
      
          - Worker info in an interface file now comes with arity info attached.
            Previously the main arity info was overloaded for this purpose, but
            it lead to a few hacks in the compiler, this tidies things up somewhat.
      
      Bottom line: we removed several fragilities, and tidied up a number of
      things.  Code size should be smaller, but we'll see...
      10cbc75d
  4. 08 Mar, 2001 2 commits
    • qrczak's avatar
      [project @ 2001-03-08 18:05:31 by qrczak] · 0171137c
      qrczak authored
      s/setIdGlobalDetails/sedGlobalIdDetails/, and import it.
      0171137c
    • simonpj's avatar
      [project @ 2001-03-08 12:07:38 by simonpj] · 51a571c0
      simonpj authored
      --------------------
      	A major hygiene pass
      	--------------------
      
      1. The main change here is to
      
      	Move what was the "IdFlavour" out of IdInfo,
      	and into the varDetails field of a Var
      
         It was a mess before, because the flavour was a permanent attribute
         of an Id, whereas the rest of the IdInfo was ephemeral.  It's
         all much tidier now.
      
         Main places to look:
      
      	   Var.lhs	Defn of VarDetails
      	   IdInfo.lhs	Defn of GlobalIdDetails
      
         The main remaining infelicity is that SpecPragmaIds are right down
         in Var.lhs, which seems unduly built-in for such an ephemeral thing.
         But that is no worse than before.
      
      
      2. Tidy up the HscMain story a little.  Move mkModDetails from MkIface
         into CoreTidy (where it belongs more nicely)
      
         This was partly forced by (1) above, because I didn't want to make
         DictFun Ids into a separate kind of Id (which is how it was before).
         Not having them separate means we have to keep a list of them right
         through, rather than pull them out of the bindings at the end.
      
      3. Add NameEnv as a separate module (to join NameSet).
      
      4. Remove unnecessary {-# SOURCE #-} imports from FieldLabel.
      51a571c0
  5. 06 Mar, 2001 1 commit
  6. 02 Mar, 2001 1 commit
  7. 01 Mar, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-03-01 14:26:00 by simonmar] · 18b24e64
      simonmar authored
      GHCi fixes:
      
        - expressions are now compiled in a pseudo-module "$Interactive",
          which avoids some problems with storage of demand-loaded declarations.
      
        - compilation manager now detects when it needs to read the interace
          for a module, even if it is already compiled.  GHCi never demand-loads
          interfaces now.
      
        - (from Simon PJ) fix a problem with the recompilation checker, which
          meant that modules were sometimes not recompiled when they should
          have been.
      
        - ByteCodeGen/Link: move linker related stuff into ByteCodeLink.
      18b24e64
  8. 28 Feb, 2001 1 commit
  9. 27 Feb, 2001 1 commit
  10. 26 Feb, 2001 3 commits
    • simonmar's avatar
      [project @ 2001-02-26 16:43:31 by simonmar] · 252fd0cd
      simonmar authored
      Update the interactive context in cmRunStmt rather than hscMain.
      252fd0cd
    • simonmar's avatar
      [project @ 2001-02-26 15:50:21 by simonmar] · 436d7d67
      simonmar authored
      - message wibbles
      
      - in one-shot mode, make sure the interface file follows the module rather
        than the filename of the source.
      436d7d67
    • simonmar's avatar
      [project @ 2001-02-26 15:06:57 by simonmar] · 1c62b517
      simonmar authored
      Implement do-style bindings on the GHCi command line.
      
      The syntax for a command-line is exactly that of a do statement, with
      the following meanings:
      
        - `pat <- expr'
          performs expr, and binds each of the variables in pat.
      
        - `let pat = expr; ...'
          binds each of the variables in pat, doesn't do any evaluation
      
        - `expr'
          behaves as `it <- expr' if expr is IO-typed, or `let it = expr'
          followed by `print it' otherwise.
      1c62b517
  11. 23 Feb, 2001 1 commit
  12. 20 Feb, 2001 2 commits
    • qrczak's avatar
      [project @ 2001-02-20 18:40:54 by qrczak] · 8c2df3ea
      qrczak authored
      Apply tweaks needed to let this compile: remove syn_map argument from
      typecheckExpr in HscMain, import PrelNum.fromInt to modules which
      use integer literals with -fno-implicit-prelude flag.
      
      It crashes later, on Directory.hs:
      ghc: panic! (the `impossible' happened):
              srtExpr
      
      I'm not sure if resolving numeric literals to top-level definitions
      of fromInt/fromInteger with -fno-implicit-prelude is a good idea.
      Using names from whatever module is called Prelude would be IMHO
      better, probably when -fglasgow-exts is given. Prel* modules themselves
      would import PrelNum as Prelude.
      
      Both schemes break for fromInt, which is non-standard and by default
      it's visible neither at the top level nor in the Prelude module. My
      proposal for dealing with it is as follows (assuming that fromInteger
      is taken from the module locally called Prelude instead of the top
      level): when the standard Prelude is used, take fromInt from PrelNum;
      when a Prelude replacement is used, use fromInt from it if available,
      otherwise use its fromInteger instead. That way Prelude replacements
      can ignore this non-standard extension and get the expected behavior,
      or they can also choose to use this extension (in a way compatible
      with Haskell implementations which allow to replace Prelude but don't
      have fromInt).
      8c2df3ea
    • simonpj's avatar
      [project @ 2001-02-20 09:38:59 by simonpj] · d5c7622a
      simonpj authored
      Back end changes [CgExpr, ClosureInfo, CoreSat, CoreUtils,
      ~~~~~~~~~~~~~~~~  CmdLineOpts, HscMain, CoreToStg, StgSyn]
      * Move CoreTidy and interface-file dumping *before* CoreSat.
        In this way interface files are not in A-normal form, so
        they are less bulky, and a bit easier to use as input to
        the optimiser.  
      
        So now CoreSat is regarded as a pre-pass to CoreToStg.
        Since CoreTidy pins on utterly-final IdInfo, CoreSat has to
        be very careful not to change the arity of any function.
      
      * CoreSat uses OrdList instead of lists to collect floating binds
        This in turn meant I could simplify the FloatingBind type a bit
      
      * Greatly simplfy the StgBinderInfo data type.  It was 
        gathering far more information than we needed.
      
      * Add a flag -fkeep-stg-types, which keeps type abstractions
        and applications in STG code, for the benefit of code generators
        that are typed; notably the .NET ILX code generator.
      d5c7622a
  13. 14 Feb, 2001 1 commit
  14. 07 Feb, 2001 2 commits
  15. 01 Feb, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-02-01 11:49:32 by simonmar] · 31853d3e
      simonmar authored
      Fix two bugs:
      
      - the typechecker wasn't attempting to resolve all the overloading when
        forcing an expression to IO type.  Now typing '1' at the prompt works
        again.
      
      - the typechecker was attempting to check for Main.main even when
        we had avoided recompilation of Main.
      31853d3e
  16. 30 Jan, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-01-30 10:53:22 by simonmar] · 675a9a5d
      simonmar authored
      Don't discard top-level functions in interactive mode, even if they're
      not exported.  When typing expressions in the context of a module, the
      entire top-level scope of the module should be available.
      675a9a5d
  17. 25 Jan, 2001 1 commit
    • simonpj's avatar
      [project @ 2001-01-25 17:47:12 by simonpj] · ab7fb945
      simonpj authored
      A big improvement to the way command-line expressions are typechecked.
      Now we don't wrap in "print" and hope for the best (the wrong "print"
      might be in scope).  Instead we work on the renamed epxression and
      do the Right Thing by using the correct "print".
      
      Also do generalisation, so that we get the right type back from
      the :t command.
      
      WARNING: it's possible that these files overlap with my fortcoming
      Big Commit of typechecker stuff, so you may need to hang on for
      a few mins.
      ab7fb945
  18. 19 Jan, 2001 1 commit
  19. 18 Jan, 2001 2 commits
  20. 17 Jan, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-01-17 16:54:04 by simonmar] · 536a6e2a
      simonmar authored
      Remove IfaceStuff and ParserStuff hacks, use happy-1.9's new multiple
      %name feature.  GHCi's command line isn't stuck in -fglasgow-exts mode
      any more.
      
      <CoverMyBack>
      YOU NOW NEED HAPPY 1.9 TO BUILD GHC.
      </CoverMyBack>
      536a6e2a
  21. 16 Jan, 2001 2 commits
  22. 20 Dec, 2000 1 commit
  23. 18 Dec, 2000 1 commit
  24. 15 Dec, 2000 1 commit
  25. 14 Dec, 2000 1 commit
  26. 11 Dec, 2000 2 commits
  27. 08 Dec, 2000 3 commits
  28. 07 Dec, 2000 2 commits
    • simonmar's avatar
      [project @ 2000-12-07 17:26:30 by simonmar] · 05c41def
      simonmar authored
      Figure out CafInfo during CoreTidy.  This is the final piece of the
      puzzle in getting the final IdInfo from the Core2Core phases, rather
      than waiting for the STG code.
      
      This simplifies the SRT phase, in that it no longer has to have a
      complicated circular algorithm to figure out the CafInfo at the same
      time as the SRT layout.
      05c41def
    • simonpj's avatar
      [project @ 2000-12-07 08:22:53 by simonpj] · 9fc29e6e
      simonpj authored
      Tidy up the Persistent Renamer State structure a little
      9fc29e6e