1. 13 Jun, 2012 1 commit
  2. 18 Jun, 2011 2 commits
  3. 15 Dec, 2010 1 commit
  4. 21 Oct, 2010 2 commits
  5. 06 Jul, 2009 1 commit
  6. 29 May, 2009 1 commit
  7. 24 May, 2009 1 commit
  8. 31 Jul, 2008 1 commit
  9. 20 Jul, 2008 1 commit
  10. 19 Feb, 2008 2 commits
  11. 24 Jan, 2008 1 commit
    • Ian Lynagh's avatar
      Fix the build · 6c7b41cc
      Ian Lynagh authored
      Work around various problems caused by some of the monadification patches
      not being applied.
  12. 17 Jan, 2008 3 commits
    • twanvl's avatar
    • twanvl's avatar
    • Isaac Dupree's avatar
      lots of portability changes (#1405) · 206b4dec
      Isaac Dupree authored
      re-recording to avoid new conflicts was too hard, so I just put it
      all in one big patch :-(  (besides, some of the changes depended on
      each other.)  Here are what the component patches were:
      Fri Dec 28 11:02:55 EST 2007  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * document BreakArray better
      Fri Dec 28 11:39:22 EST 2007  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * properly ifdef BreakArray for GHCI
      Fri Jan  4 13:50:41 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * change ifs on __GLASGOW_HASKELL__ to account for... (#1405)
        for it not being defined. I assume it being undefined implies
        a compiler with relatively modern libraries but without most
        unportable glasgow extensions.
      Fri Jan  4 14:21:21 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * MyEither-->EitherString to allow Haskell98 instance
      Fri Jan  4 16:13:29 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * re-portabilize Pretty, and corresponding changes
      Fri Jan  4 17:19:55 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * Augment FastTypes to be much more complete
      Fri Jan  4 20:14:19 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * use FastFunctions, cleanup FastString slightly
      Fri Jan  4 21:00:22 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * Massive de-"#", mostly Int# --> FastInt (#1405)
      Fri Jan  4 21:02:49 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * miscellaneous unnecessary-extension-removal
      Sat Jan  5 19:30:13 EST 2008  Isaac Dupree <id@isaac.cedarswampstudios.org>
        * add FastFunctions
  13. 04 Sep, 2007 1 commit
  14. 03 Sep, 2007 1 commit
  15. 01 Sep, 2007 1 commit
  16. 22 Aug, 2007 1 commit
  17. 18 May, 2007 1 commit
  18. 06 Apr, 2007 1 commit
  19. 03 Apr, 2007 1 commit
  20. 11 Oct, 2006 1 commit
    • Simon Marlow's avatar
      Module header tidyup, phase 1 · 49c98d14
      Simon Marlow authored
      This patch is a start on removing import lists and generally tidying
      up the top of each module.  In addition to removing import lists:
         - Change DATA.IOREF -> Data.IORef etc.
         - Change List -> Data.List etc.
         - Remove $Id$
         - Update copyrights
         - Re-order imports to put non-GHC imports last
         - Remove some unused and duplicate imports
  21. 15 Aug, 2006 1 commit
  22. 25 Jul, 2006 1 commit
  23. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
  24. 31 Mar, 2005 1 commit
  25. 06 Nov, 2003 1 commit
    • simonpj's avatar
      [project @ 2003-11-06 17:09:50 by simonpj] · 1f5e5580
      simonpj authored
      	Major increment for Template Haskell
      1.  New abstract data type "Name" which appears where String used to be.
          E.g. 	data Exp = VarE Name | ...
      2.  New syntax 'x and ''T, for quoting Names.  It's rather like [| x |]
          and [t| T |] respectively, except that
      	a) it's non-monadic:  'x :: Name
      	b) you get a Name not an Exp or Type
      3.  reify is an ordinary function
      	reify :: Name -> Q Info
          New data type Info which tells what TH knows about Name
      4.  Local variables work properly.  So this works now (crashed before):
      	f x = $( [| x |] )
      5.  THSyntax is split up into three modules:
        Language.Haskell.TH		TH "clients" import this
        Language.Haskell.TH.THSyntax	data type declarations and internal stuff
        Language.Haskell.TH.THLib	Support library code (all re-exported
      				by TH), including smart constructors and
      				pretty printer
      6.  Error reporting and recovery are in (not yet well tested)
      	report :: Bool {- True <=> fatal -} -> String -> Q ()
      	recover :: Q a -> Q a -> Q a
      7.  Can find current module
      	currentModule :: Q String
      Much other cleaning up, needless to say.
  26. 17 Sep, 2003 1 commit
  27. 16 Sep, 2003 1 commit
  28. 29 Aug, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-08-29 15:44:11 by simonmar] · ce9687a5
      simonmar authored
        - The main goal is to remove dependencies on hslibs for a
          bootstrapped compiler, leaving only a requirement that the
          packages base, haskell98 and readline are built in stage 1 in
          order to bootstrap.  We're almost there: Posix is still required
          for signal handling, but all other dependencies on hslibs are now
          Uses of Addr and ByteArray/MutableByteArray array are all gone
          from the compiler.  PrimPacked defines the Ptr type for GHC 4.08
          (which didn't have it), and it defines simple BA and MBA types to
          replace uses of ByteArray and MutableByteArray respectively.
        - Clean up import lists.  HsVersions.h now defines macros for some
          modules which have moved between GHC versions.  eg. one now
          imports 'GLAEXTS' to get at unboxed types and primops in the
          Many import lists have been sorted as per the recommendations in
          the new style guidelines in the commentary.
      I've built the compiler with GHC 4.08.2, 5.00.2, 5.02.3, 5.04 and
      itself, and everything still works here.  Doubtless I've got something
      wrong, though.
  29. 01 Apr, 2002 1 commit
  30. 11 Dec, 2001 1 commit
  31. 18 May, 2001 1 commit
    • simonpj's avatar
      [project @ 2001-05-18 08:46:18 by simonpj] · b4775e5e
      simonpj authored
      	Get unbox-strict-fields right
      The problem was that when a library was compiled *without* -funbox-strict-fields,
      and the main program was compiled *with* that flag, we were wrongly treating
      the fields of imported data types as unboxed.
      To fix this I added an extra constructor to StrictnessMark to express whether
      the "!" annotation came from an interface file (don't fiddle) or a source
      file (decide whether to unbox).
      On the way I tided things up:
      * StrictnessMark moves to Demand.lhs, and doesn't have the extra DataCon
        fields that kept it in DataCon before.
      * HsDecls.BangType has one constructor, not three, with a StrictnessMark field.
      * DataCon keeps track of its strictness signature (dcRepStrictness), but not
        its "user strict marks" (which were never used)
      * All the functions, like getUniquesDs, that used to take an Int saying how
        many uniques to allocate, now return an infinite list. This saves arguments
        and hassle.  But it involved touching quite a few files.
      * rebuildConArgs takes a list of Uniques to use as its unique supply.  This
        means I could combine DsUtils.rebuildConArgs with MkId.rebuildConArgs
        (hooray; the main point of the previous change)
      I also tidied up one or two error messages
  32. 07 Dec, 2000 1 commit
    • simonpj's avatar
      [project @ 2000-12-07 09:28:42 by simonpj] · 0b62f53e
      simonpj authored
      Do a better job of eta expansion.
      This showed up in one of Manuel's programs, where he got code like:
      	     (\ i :: Int ->
      		  case i of wild1 { I# i# ->
      		  case w of wild2 { I# e# ->
      		  __coerce (ST RealWorld ())
      		  (\ s# :: (State# RealWorld) ->
      		       case writeIntArray# @ RealWorld mba# i# e# s#
      		       of s2#1 { __DEFAULT ->
      		       (# s2#1, () #)
      The argument wasn't eta expanded, so it got right through to
      the code generator as two separte lambdas.
      Needless to say, I fiddled around with things in a vain attempt
      to tidy them up.  Yell if anything seems to go wrong, or perfomance
      drops on any programs.
  33. 15 Jun, 2000 1 commit
    • sewardj's avatar
      [project @ 2000-06-15 08:38:25 by sewardj] · 665229e5
      sewardj authored
      Major thing: new register allocator.  Brief description follows.
      Should correctly handle code with loops in, even though we don't
      generate any such at the moment.  A lot of comments.  The previous
      machinery for spilling is retained, as is the idea of a fast-and-easy
      initial allocation attempt intended to deal with the majority of code
      blocks (about 60% on x86) very cheaply.  Many comments explaining
      in detail how it works :-)
      The Stix inliner is now on by default.  Integer code seems to run
      within about 1% of that -fvia-C.  x86 fp code is significantly worse,
      up to about 30% slower, depending on the amount of fp activity.
      Minor thing: lazyfication of the top-level NCG plumbing, so that the
      NCG doesn't require any greater residency than compiling to C, just a
      bit more time.  Created lazyThenUs and lazyMapUs for this purpose.
      The new allocator is somewhat, although not catastophically, slower
      than the old one.  Fixing of the long-standing NCG space leak more
      than makes up for it; overall hsc run-time is down about 5%, due to
      significantly reduced GC time.
      Instructions are numbered sequentially, starting at zero.
      A flow edge (FE) is a pair of insn numbers (MkFE Int Int) denoting
      a possible flow of control from the first insn to the second.
      The input to the register allocator is a list of instructions, which
      mention Regs.  A Reg can be a RealReg -- a real machine reg -- or a
      VirtualReg, which carries a unique.  After allocation, all the
      VirtualReg references will have been converted into RealRegs, and
      possibly some spill code will have been inserted.
      The heart of the register allocator works in four phases.
      1.  (find_flow_edges) Calculate all the FEs for the code list.
          Return them not as a [FE], but implicitly, as a pair of
          Array Int [Int], being the successor and predecessor maps
          for instructions.
      2.  (calc_liveness) Returns a FiniteMap FE RegSet.  For each
          FE, indicates the set of registers live on that FE.  Note
          that the set includes both RealRegs and VirtualRegs.  The
          former appear because the code could mention fixed register
          usages, and we need to take them into account from the start.
      3.  (calc_live_range_sets) Invert the above mapping, giving a
          FiniteMap Reg FeSet, indicating, for each virtual and real
          reg mentioned in the code, which FEs it is live on.
      4.  (calc_vreg_to_rreg_mapping) For virtual reg, try and find
          an allocatable real register for it.  Each real register has
          a "current commitment", indicating the set of FEs it is
          currently live on.  A virtual reg v can be assigned to
          real reg r iff v's live-fe-set does not intersect with r's
          current commitment fe-set.  If the assignment is made,
          v's live-fe-set is union'd into r's current commitment fe-set.
          There is also the minor restriction that v and r must be of
          the same register class (integer or floating).
          Once this mapping is established, we simply apply it to the
          input insns, and that's it.
          If no suitable real register can be found, the vreg is mapped
          to itself, and we deem allocation to have failed.  The partially
          allocated code is returned.  The higher echelons of the allocator
          (doGeneralAlloc and runRegAlloc) then cooperate to insert spill
          code and re-run allocation, until a successful allocation is found.
  34. 11 May, 1999 1 commit
    • keithw's avatar
      [project @ 1999-05-11 16:37:29 by keithw] · d133b73a
      keithw authored
      (this is number 4 of 9 commits to be applied together)
        The major purpose of this commit is to introduce usage information
        and usage analysis into the compiler, per the paper _Once Upon a
        Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99,
        and Glasgow TR-1998-19).
        Usage information has been added to types, in the form of a new kind
        of NoteTy: (UsgNote UsageAnn(UsOnce|UsMany|UsVar UVar)).  Usages
        print as __o (once), __m (many, usually omitted), or (not in
        interface files) __uvxxxx.  Usage annotations should only appear at
        certain places in a type (see the paper).  The `default' annotation
        is __m, and so an omitted annotation implies __m.  Utility functions
        for handling usage annotations are provided in Type.
        If the compiler is built with -DUSMANY (a flag intended for use in
        debugging by KSW only), __m are *required* and may not be omitted.
        The major constraint is that type arguments (eg to mkAppTy) must be
        unannotated on top.  To maintain this invariant, many functions
        required the insertion of Type.unUsgTy (removing annot from top of a
        type) or UsageSPUtils.unannotTy (removing all annotations from a
        type).  A function returning usage-annotated types for primops has
        been added to PrimOp.
        A new kind of Note, (TermUsg UsageAnn), has been added to annotate
        Terms.  This note is *not* printed in interface files, and for the
        present does not escape the internals of the usage inference engine.
  35. 29 Jan, 1999 1 commit