1. 01 Oct, 2004 7 commits
    • simonpj's avatar
      [project @ 2004-10-01 16:39:26 by simonpj] · fc6e8220
      simonpj authored
      Allow kind signatures in GADT data type declarations
      fc6e8220
    • simonpj's avatar
      [project @ 2004-10-01 14:25:12 by simonpj] · ce3ae762
      simonpj authored
      Comments only
      ce3ae762
    • ross's avatar
      [project @ 2004-10-01 13:46:07 by ross] · 762ec41d
      ross authored
      fix dummy ASSERTM2 macro
      762ec41d
    • simonpj's avatar
      [project @ 2004-10-01 13:42:04 by simonpj] · 837824d2
      simonpj authored
      ------------------------------------
      	Simplify the treatment of newtypes
      	Complete hi-boot file consistency checking
      	------------------------------------
      
      In the representation of types, newtypes used to have a special constructor
      all to themselves, very like TyConApp, called NewTcApp.    The trouble is
      that means we have to *know* when a newtype is a newtype, and in an hi-boot
      context we may not -- the data type might be declared as
      	data T
      in the hi-boot file, but as
      	newtype T = ...
      in the source file.  In GHCi, which accumulates stuff from multiple compiles,
      this makes a difference.
      
      So I've nuked NewTcApp.  Newtypes are represented using TyConApps again. This
      turned out to reduce the total amount of code, and simplify the Type data type,
      which is all to the good.
      
      
      This commit also fixes a few things in the hi-boot consistency checking
      stuff.
      837824d2
    • simonpj's avatar
      [project @ 2004-10-01 11:12:30 by simonpj] · fadd15c6
      simonpj authored
      Remove bogus defn in hi-boot
      fadd15c6
    • simonpj's avatar
      [project @ 2004-10-01 10:08:49 by simonpj] · da95f4a0
      simonpj authored
      -----------------------------------
      	Do simple checking on hi-boot files
      	-----------------------------------
      
      This commit arranges that, when compiling A.hs, we compare
      the types we infer with those in A.hi-boot, if the latter 
      exists.  (Or, more accurately, if anything A.hs imports in
      turn imports A.hi-boot, directly or indirectly.)
      
      This has been on the to-do list forever.
      da95f4a0
    • simonpj's avatar
      [project @ 2004-10-01 09:49:14 by simonpj] · 1276aa3f
      simonpj authored
      Generate in the @size suffix for a stdcall symbol properly.
      1276aa3f
  2. 30 Sep, 2004 5 commits
    • panne's avatar
      [project @ 2004-09-30 19:24:53 by panne] · dfd0a66e
      panne authored
      Make it compile with a GHC 6.x. The layout rule seems to be a mystery
      even for one of the "fathers" of Haskell...  :-}
      dfd0a66e
    • simonpj's avatar
      [project @ 2004-09-30 14:45:41 by simonpj] · d709f886
      simonpj authored
      Add HsPat.hi-boot
      d709f886
    • simonpj's avatar
      [project @ 2004-09-30 10:35:15 by simonpj] · 23f40f0e
      simonpj authored
      ------------------------------------
      	Add Generalised Algebraic Data Types
      	------------------------------------
      
      This rather big commit adds support for GADTs.  For example,
      
          data Term a where
       	  Lit :: Int -> Term Int
      	  App :: Term (a->b) -> Term a -> Term b
      	  If  :: Term Bool -> Term a -> Term a
      	  ..etc..
      
          eval :: Term a -> a
          eval (Lit i) = i
          eval (App a b) = eval a (eval b)
          eval (If p q r) | eval p    = eval q
          		    | otherwise = eval r
      
      
      Lots and lots of of related changes throughout the compiler to make
      this fit nicely.
      
      One important change, only loosely related to GADTs, is that skolem
      constants in the typechecker are genuinely immutable and constant, so
      we often get better error messages from the type checker.  See
      TcType.TcTyVarDetails.
      
      There's a new module types/Unify.lhs, which has purely-functional
      unification and matching for Type. This is used both in the typechecker
      (for type refinement of GADTs) and in Core Lint (also for type refinement).
      23f40f0e
    • simonmar's avatar
      [project @ 2004-09-30 10:31:58 by simonmar] · 9b6858cb
      simonmar authored
      Add -I- after the include paths when running gcc.  This prevents
      accidental shadowing of system includes by putting a file called
      eg. stdint.h in the current directory.
      9b6858cb
    • krasimir's avatar
      [project @ 2004-09-30 05:54:18 by krasimir] · 84295ea0
      krasimir authored
      absCSyn directory doesn't exists in the HEAD
      84295ea0
  3. 29 Sep, 2004 1 commit
  4. 28 Sep, 2004 2 commits
  5. 27 Sep, 2004 1 commit
  6. 17 Sep, 2004 1 commit
  7. 16 Sep, 2004 1 commit
  8. 15 Sep, 2004 4 commits
    • ross's avatar
      [project @ 2004-09-15 17:48:08 by ross] · daf67985
      ross authored
      arrow notation: allow arrow applications (f -< a) to take a non-empty
      command stack, as suggested by Sebastian Boldt <Sebastian.Boldt@arcor.de>.
      daf67985
    • simonmar's avatar
      [project @ 2004-09-15 12:06:08 by simonmar] · 39439207
      simonmar authored
      Oops, fix bugs in previous commit.
      39439207
    • simonmar's avatar
      [project @ 2004-09-15 11:45:24 by simonmar] · f220cc51
      simonmar authored
      Add a couple of cases to mk_switch to catch the case when we have a
      tag range that has a lot of default cases at either end, and we're not
      using a single switch.  In situations like this we want to eliminate
      the default cases with an if-statement, before dealing with the rest
      of the branches, which might then be suitable for a switch.
      
      Also, ignore empty tag slots at either end of the range if there is no
      default case.
      
      This might work around a gcc 2.95 bug that we tickled with the
      code being generated before.
      f220cc51
    • wolfgang's avatar
      [project @ 2004-09-15 02:47:03 by wolfgang] · f19e3063
      wolfgang authored
      Accept '#pragma' lines in the cmm parser.
      This is necessary because Apple's version of GNU cpp 3.3 leaves #pragma
      lines in it's output, which cause the build to fail on Mac OS X with
      GCC >= 3.3
      f19e3063
  9. 10 Sep, 2004 5 commits
  10. 08 Sep, 2004 2 commits
  11. 07 Sep, 2004 2 commits
  12. 02 Sep, 2004 2 commits
  13. 01 Sep, 2004 2 commits
    • simonmar's avatar
      [project @ 2004-09-01 14:14:29 by simonmar] · 3b758ccb
      simonmar authored
      Minore package GHC fixes, and a couple of changes for Visual Studio.
      Messages from the compiler should now go through a new API in
      ErrUtils, so that they can be redirected by the GHC client if
      necessary.  (currently not all messages go through this interface, but
      some of them do).
      3b758ccb
    • simonmar's avatar
      [project @ 2004-09-01 09:43:25 by simonmar] · a8f00cda
      simonmar authored
      Catch exit(127) result from raw system, and report that we couldn't
      execute the program.  This is a semi-hack; all exec() errors get
      reported as exit(127) by rawSystem, but if we treat it just like a
      program that does exit(127) then the user sees no output.
      a8f00cda
  14. 31 Aug, 2004 1 commit
  15. 27 Aug, 2004 2 commits
  16. 26 Aug, 2004 2 commits
    • simonpj's avatar
      [project @ 2004-08-26 15:44:50 by simonpj] · bb88e732
      simonpj authored
      -------------------------------
      	Print built-in sytax right
      	-------------------------------
      
      Built-in syntax, like (:) and [], is not "in scope" via the GlobalRdrEnv
      in the usual way.  When we print it out, we should also print it in unqualified
      form, even though it's not in the environment.
      
      I've finally bitten the (not very big) bullet, and added to Name the information
      about whether or not a name is one of these built-in ones.  That entailed changing
      the calls to mkWiredInName, but those are exactly the places where you have to
      decide whether it's built-in or not, which is fine.
      
      
      Built-in syntax => It's a syntactic form, not "in scope" (e.g. [])
      
      Wired-in thing  => The thing (Id, TyCon) is fully known to the compiler,
      		   not read from an interface file.
      		   E.g. Bool, True, Int, Float, and many others
      
      All built-in syntax is for wired-in things.
      bb88e732
    • simonpj's avatar
      [project @ 2004-08-26 14:24:46 by simonpj] · f5eaddd4
      simonpj authored
      Fix recently-introduced improvement bug
      f5eaddd4