1. 07 Oct, 2004 2 commits
  2. 06 Oct, 2004 2 commits
  3. 05 Oct, 2004 2 commits
  4. 04 Oct, 2004 7 commits
    • simonpj's avatar
      [project @ 2004-10-04 15:51:00 by simonpj] · f469905a
      simonpj authored
      ------------------------------------
      	Part-fix an awkward interaction
      	between case-of-case and GADTs
      	------------------------------------
      
      Consider
      	data T a where
      	  MkT :: a -> b -> T a
      
      	f = /\a. \(w::a).
      	   case (case ...) of
      		  MkT a' b (p::a') (q::b) -> [p,w]
      
      The danger is that we'll make a join point
      
      	j a' p = [p,w]
      
      and that's ill-typed, because (p::a') but (w::a).
      
      Solution so far: don't abstract over a', because the type refinement
      maps [a' -> a] .  Ultimately that won't work when real refinement goes on.
      
      Then we must abstract over any refined free variables.  Hmm.  Maybe we
      could just abstract over *all* free variables, thereby lambda-lifting
      the join point?   We should try this.
      f469905a
    • simonpj's avatar
      [project @ 2004-10-04 09:35:08 by simonpj] · 3b7d2756
      simonpj authored
      Sort decls in cycle for error message
      3b7d2756
    • simonpj's avatar
      [project @ 2004-10-04 09:28:00 by simonpj] · ae0b2a9e
      simonpj authored
      Better reporting of duplicate top-level defns
      ae0b2a9e
    • simonpj's avatar
      [project @ 2004-10-04 09:27:32 by simonpj] · 864388a3
      simonpj authored
      Make combineSrcSpans commutative
      864388a3
    • simonpj's avatar
      [project @ 2004-10-04 09:11:09 by simonpj] · a022fe50
      simonpj authored
      Improve error locations for binding conflicts
      a022fe50
    • dons's avatar
      [project @ 2004-10-04 05:54:04 by dons] · 870b2298
      dons authored
      Warning police. Move prototype of genericRaise into RtsExternal.h, so
      the libraries can see it.
      870b2298
    • wolfgang's avatar
      [project @ 2004-10-04 03:37:22 by wolfgang] · 004ecb39
      wolfgang authored
      Mac OS X:
      Make the Linker deal properly with object files that lack a symbol table or
      a dynamic symbol table.
      Objects that don't import any symbols don't get a dynamic symbol table,
      which caused GHCi to crash.
      
      MERGE TO STABLE
      004ecb39
  5. 03 Oct, 2004 7 commits
    • panne's avatar
      [project @ 2004-10-03 17:13:34 by panne] · 97417a39
      panne authored
      Warning police (added missing #include)
      97417a39
    • panne's avatar
      [project @ 2004-10-03 16:50:53 by panne] · 66dda5a5
      panne authored
      Warning police (bring 'raise' into scope)
      66dda5a5
    • panne's avatar
      [project @ 2004-10-03 16:50:01 by panne] · ca068e74
      panne authored
      Synched with latest GHC #include changes: Add '.' to the #include path manually.
      ca068e74
    • panne's avatar
      [project @ 2004-10-03 16:37:42 by panne] · 6f44f99a
      panne authored
      Warning police
      6f44f99a
    • panne's avatar
      [project @ 2004-10-03 16:28:02 by panne] · b89ad0e9
      panne authored
      Improved #include path handling:
      
      * Don't use '-I-', it breaks a lot of system headers, e.g.
      
           #include <GL/glut.h>
      
        fails (when using freeglut), because /usr/include/GL/glut.h contains
      
           #include "freeglut_std.h"
      
        but /usr/include/GL/freeglut_std.h will not be found. It is a bit
        debatable if the header is broken and should use
      
           #include "GL/freeglut_std.h"
      
        instead. Anyway, a grep through the SuSE 9.1 system headers shows that
        there seems to be no real common practice, so let's play safe and don't
        use '-I-'.
      
      * Don't use '-I .', #include stub headers "locally" instead, e.g. use
      
           #include "Concurrent_stub.h"
      
        instead of
      
           #include "Control/Concurrent_stub.h"
      
        Note that "Control" is still in the #include path, because the *.hc file
        is normally in /tmp and the stub header is in the directory where *.hs
        is. We could remove this path element, too, if the stub header would be
        copied to the directory of the *.hc file during compilation. SimonM?
      b89ad0e9
    • ross's avatar
      [project @ 2004-10-03 16:17:08 by ross] · df87e59e
      ross authored
      spelling
      df87e59e
    • dons's avatar
      [project @ 2004-10-03 02:04:29 by dons] · c61f8941
      dons authored
      Make sure genericRaise symbol is defined on all platforms, so Linker.c
      won't complain, even if they don't actually use it.
      c61f8941
  6. 02 Oct, 2004 2 commits
    • wolfgang's avatar
      [project @ 2004-10-02 15:12:48 by wolfgang] · 65fd4516
      wolfgang authored
      Deal with Apple's broken cpp 3.3 (you know, the one that inserts useless
      #pragma lines into it's output) by filtering it's output through
      grep -v.
      This shouldn't be a problem for other platforms, and it's much simpler
      than to make the parsers for ghc-pkg, genprimopcode and happy ignore
      those lines.
      
      MERGE TO STABLE
      65fd4516
    • dons's avatar
      [project @ 2004-10-02 07:32:25 by dons] · 20d697a1
      dons authored
      When linking against libpthreads, raise(3) can behave strangely on
      some platforms (OpenBSD at least, maybe other BSDs, not Linux). So use
      pthread_kill() to generate signals when running the threaded rts,
      instead of raise(), when System.Posix.Signals.raiseSignal is called.
      
      raiseSignal will call genericRaise, in the rts, which knows which
      function to use.
      20d697a1
  7. 01 Oct, 2004 11 commits
    • panne's avatar
      [project @ 2004-10-01 19:23:47 by panne] · 1749c262
      panne authored
      Layout rule again...
      1749c262
    • 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 16:04:23 by simonpj] · 356b0d0f
      simonpj authored
      First-cut documentation for GADTs
      356b0d0f
    • simonpj's avatar
      [project @ 2004-10-01 16:03:58 by simonpj] · a73c835a
      simonpj authored
      A bit more about hi-boot
      a73c835a
    • 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
    • wolfgang's avatar
      [project @ 2004-10-01 03:52:57 by wolfgang] · 352def90
      wolfgang authored
      Replace \? by \{0,1\} in the sed regular expressions, as the former
      does not work with Mac OS X's (= BSD's) sed.
      
      I'm a bit confused by the situation here:
      According to Mac OS X man pages, the latter syntax is part of the
      POSIX 1003.2 standard for basic regular expressions, while the former
      is not. According to the manpage installed with my Gentoo linux, neither
      is in the POSIX standard.
      
      However, GNU sed accepts both \? and \{0,1\}, while Mac OS X's sed accepts
      only \{0,1\}.
      352def90
  8. 30 Sep, 2004 7 commits
    • panne's avatar
      [project @ 2004-09-30 21:00:57 by panne] · 3772fc40
      panne authored
      Stylistic changes
      3772fc40
    • panne's avatar
      [project @ 2004-09-30 20:56:49 by panne] · bc4b6a82
      panne authored
      Get all project info from configure.ac
      bc4b6a82
    • 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