1. 28 Apr, 2009 1 commit
    • Ian Lynagh's avatar
      Fix error handling · e213baf0
      Ian Lynagh authored
      After the fix to #2500, we could get "Failing due to -Werror." but no
      warnings printed. Now we don't fail in that case.
      e213baf0
  2. 21 Apr, 2009 2 commits
  3. 12 Mar, 2009 1 commit
    • Simon Marlow's avatar
      FIX #3079, dodgy parsing of LANGUAGE pragmas · c197fe60
      Simon Marlow authored
      I ended up rewriting this horrible bit of code, using (yikes) lazy I/O
      to slurp in the source file a chunk at a time.  The old code tried to
      read the file a chunk at a time, but failed with LANGUAGE pragmas
      because the parser for LANGUAGE has state and the state wasn't being
      saved between chunks.  We're still closing the Handle eagerly, so
      there shouldn't be any problems here.
      c197fe60
  4. 02 Dec, 2008 1 commit
    • Simon Marlow's avatar
      Put full ImportDecls in ModSummary instead of just ModuleNames · 25ed0cf7
      Simon Marlow authored
      ... and use it to make ghc -M generate correct cross-package
      dependencies when using package-qualified imports (needed for the new
      build system).  Since we're already parsing the ImportDecl from the
      source file, there seems no good reason not to keep it in the
      ModSummary, it might be useful for other things too.
      25ed0cf7
  5. 21 Nov, 2008 3 commits
  6. 10 Oct, 2008 1 commit
  7. 26 Aug, 2008 1 commit
  8. 05 Aug, 2008 1 commit
    • Simon Marlow's avatar
      Add -XPackageImports, new syntax for package-qualified imports · 1867a7bb
      Simon Marlow authored
      Now you can say
        
        import "network" Network.Socket
      
      and get Network.Socket from package "network", even if there are
      multiple Network.Socket modules in scope from different packages
      and/or the current package.
      
      This is not really intended for general use, it's mainly so that we
      can build backwards-compatible versions of packages, where we need to
      be able to do
      
      module GHC.Base (module New.GHC.Base) where
      import "base" GHC.Base as New.GHC.Base
      1867a7bb
  9. 31 Jul, 2008 1 commit
  10. 30 Jul, 2008 1 commit
  11. 20 Jun, 2008 1 commit
  12. 14 Jun, 2008 2 commits
  13. 06 Apr, 2008 1 commit
  14. 27 Jan, 2008 1 commit
  15. 17 Jan, 2008 1 commit
    • 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
      206b4dec
  16. 01 Nov, 2007 1 commit
    • David Waern's avatar
      Refactor Haddock options · 03d8585e
      David Waern authored
      This patch renames the DOC_OPTIONS pragma to OPTIONS_HADDOCK. It also
      adds "-- # ..."-style Haddock option pragmas, for compatibility with
      code that use them.
      
      Another change is that both of these two pragmas behave like
      OPTIONS_GHC, i.e. they are only allowed at the top of the module, they
      are ignored everywhere else and they are stored in the dynflags. There is
      no longer any Haddock options in HsSyn.
      
      Please merge this to the 6.8.2 branch when 6.8.1 is out, if appropriate.
      03d8585e
  17. 21 Sep, 2007 1 commit
  18. 11 Sep, 2007 1 commit
  19. 04 Sep, 2007 1 commit
  20. 03 Sep, 2007 1 commit
  21. 01 Sep, 2007 1 commit
  22. 09 Aug, 2007 1 commit
  23. 08 Aug, 2007 1 commit
  24. 05 Aug, 2007 1 commit
  25. 04 Aug, 2007 1 commit
  26. 10 May, 2007 1 commit
  27. 12 Jan, 2007 1 commit
  28. 02 Nov, 2006 1 commit
  29. 25 Oct, 2006 1 commit
  30. 24 Oct, 2006 1 commit
  31. 11 Oct, 2006 1 commit
  32. 05 Oct, 2006 1 commit
  33. 25 Jul, 2006 1 commit
    • Simon Marlow's avatar
      Generalise Package Support · 61d2625a
      Simon Marlow authored
      This patch pushes through one fundamental change: a module is now
      identified by the pair of its package and module name, whereas
      previously it was identified by its module name alone.  This means
      that now a program can contain multiple modules with the same name, as
      long as they belong to different packages.
      
      This is a language change - the Haskell report says nothing about
      packages, but it is now necessary to understand packages in order to
      understand GHC's module system.  For example, a type T from module M
      in package P is different from a type T from module M in package Q.
      Previously this wasn't an issue because there could only be a single
      module M in the program.
      
      The "module restriction" on combining packages has therefore been
      lifted, and a program can contain multiple versions of the same
      package.
      
      Note that none of the proposed syntax changes have yet been
      implemented, but the architecture is geared towards supporting import
      declarations qualified by package name, and that is probably the next
      step.
      
      It is now necessary to specify the package name when compiling a
      package, using the -package-name flag (which has been un-deprecated).
      Fortunately Cabal still uses -package-name.
      
      Certain packages are "wired in".  Currently the wired-in packages are:
      base, haskell98, template-haskell and rts, and are always referred to
      by these versionless names.  Other packages are referred to with full
      package IDs (eg. "network-1.0").  This is because the compiler needs
      to refer to entities in the wired-in packages, and we didn't want to
      bake the version of these packages into the comiler.  It's conceivable
      that someone might want to upgrade the base package independently of
      GHC.
      
      Internal changes:
      
        - There are two module-related types:
      
              ModuleName      just a FastString, the name of a module
              Module          a pair of a PackageId and ModuleName
      
          A mapping from ModuleName can be a UniqFM, but a mapping from Module
          must be a FiniteMap (we provide it as ModuleEnv).
      
        - The "HomeModules" type that was passed around the compiler is now
          gone, replaced in most cases by the current package name which is
          contained in DynFlags.  We can tell whether a Module comes from the
          current package by comparing its package name against the current
          package.
      
        - While I was here, I changed PrintUnqual to be a little more useful:
          it now returns the ModuleName that the identifier should be qualified
          with according to the current scope, rather than its original
          module.  Also, PrintUnqual tells whether to qualify module names with
          package names (currently unused).
      
      Docs to follow.
      61d2625a
  34. 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.
      0065d5ab
  35. 10 Mar, 2006 1 commit
    • David Himmelstrup's avatar
      Parse OPTIONS properly and cache the result. · d700953c
      David Himmelstrup authored
      Use the lexer to parse OPTIONS, LANGUAGE and INCLUDE pragmas.
      This gives us greater flexibility and far better error
      messages. However, I had to make a few quirks:
        * The token parser is written manually since Happy doesn't
          like lexer errors (we need to extract options before the
          buffer is passed through 'cpp'). Still better than
          manually parsing a String, though.
        * The StringBuffer API has been extended so files can be
          read in blocks.
      I also made a new field in ModSummary called ms_hspp_opts
      which stores the updated DynFlags. Oh, and I took the liberty
      of moving 'getImports' into HeaderInfo together with
      'getOptions'.
      d700953c