1. 18 Sep, 2008 2 commits
    • Jedai's avatar
      RichTokenStream support · 36104d7a
      Jedai authored
      This patch adds support for raw token streams, that contain more
      information than normal token streams (they contains comments at
      least). The "lexTokenStream" function brings this support to the
      Lexer module. In addition to that, functions have been added to
      the GHC module to make easier to recover of the token stream of 
      a module ("getTokenStream").
      
      Building on that, I added what could be called "rich token
      stream": token stream to which have been added the source string
      corresponding to each token, the function addSourceToToken takes
      a StringBuffer and a starting SrcLoc and a token stream and build
      this rich token stream. getRichTokenStream is a convenience
      function to get a module rich token stream. "showRichTokenStream"
      use the SrcLoc information in such a token stream to get a string
      similar to the original source (except unsignificant
      whitespaces). Thus "putStrLn . showRichTokenStream =<<
      getRichTokenStream s mod" should print a valid module source, the
      interesting part being to modify the token stream between the get
      and the show of course.
      36104d7a
    • Ian Lynagh's avatar
  2. 17 Sep, 2008 3 commits
  3. 16 Sep, 2008 3 commits
  4. 12 Sep, 2008 1 commit
  5. 10 Sep, 2008 1 commit
  6. 15 Sep, 2008 1 commit
  7. 14 Sep, 2008 10 commits
  8. 15 Sep, 2008 1 commit
  9. 14 Sep, 2008 1 commit
  10. 10 Sep, 2008 1 commit
    • simonpj@microsoft.com's avatar
      Robustify the setting of implied flags · 3998d13f
      simonpj@microsoft.com authored
      When setting implied flags, do so recursively.  So if -Xa implies -Xb,
      and -Xb implies -Xc, we do the right thing. 
      
      I thought we needed this, but we don't.  But it seems like a good idea
      anyway.
      3998d13f
  11. 01 Sep, 2008 1 commit
    • Simon Marlow's avatar
      Check the modification times of libraries in --make link step · 880a6b90
      Simon Marlow authored
      When linking in --make we check the modification time of the
      executable against the modification time of the object files, and only
      re-link if any object file is newer.  However, we should also check
      the modification times of packages, since the recompilation checker
      also tracks dependencies in packages.  
      
      In a GHC build this means that if you recompile stage2 and don't
      manage to change any fingerpints, we won't recompile Main but we'll
      still re-link it.
      880a6b90
  12. 28 Aug, 2008 1 commit
  13. 27 Aug, 2008 1 commit
    • Simon Marlow's avatar
      re-fix of #1205, fix #2542 · 3d73e45b
      Simon Marlow authored
      New form of :load in GHCi:
      
      > :load *A
      
      forces A to be loaded as byte-code.  See the manual for details.  The
      previous behaviour for specifying filenames vs. module names on the
      command line and in :load has been restored.
      
      The Target datatype has a new Bool field, which is True if the target
      is allowed to be loaded from compiled code, or False otherwise, so
      this functionality is available via the GHC API.  guessTarget
      understands the *-prefix form for specifying targets.
      3d73e45b
  14. 26 Aug, 2008 4 commits
    • Ian Lynagh's avatar
      Give locations of flag warnings/errors · fc9bbbab
      Ian Lynagh authored
      fc9bbbab
    • Ian Lynagh's avatar
      Remove a now-redundant comment · 54280054
      Ian Lynagh authored
      54280054
    • Ian Lynagh's avatar
      Separate the static flag parser from the static global variables · fb9d3922
      Ian Lynagh authored
      This allows us to avoid a module import loop:
      CmdLineParser -> SrcLoc -> Outputable -> StaticFlags -> CmdLineParser
      fb9d3922
    • simonpj@microsoft.com's avatar
      Fix flaggery for RULES (cf Trac #2497) · 24b1e136
      simonpj@microsoft.com authored
      This patch executes the plan described in the discussion in Trac #2497.
      Specficially:
      
          * Inside a RULE, switch on the forall-as-keyword in the lexer,
            unconditionally. (Actually this is done by an earlier patch.)
      
          * Merge the -XScopedTypeVariables and -XPatternSignatures flags,
            and deprecate the latter. Distinguishing them isn't senseless,
            but it's jolly confusing.
      
          * Inside a RULE, switch on -XScopedTypeVariables unconditionally. 
      
          * Change -frewrite-rules to -fenable-rewrite-rules; deprecate the former. 
            Internally the DynFlag is now Opt_EnableRewriteRules.
      
      There's a test in typecheck/should_compile/T2497.hs
      24b1e136
  15. 25 Aug, 2008 1 commit
  16. 21 Aug, 2008 1 commit
    • Simon Marlow's avatar
      Don't use the cc-options from packages when compiling .hc files · 39271273
      Simon Marlow authored
      Now that we don't include any header files in .hc apart from our own,
      the cc-options from packages are at best superfluous, so don't pass
      them.
      
      We still pass them to .c compilations, although I've just made changes
      to Cabal so that cc-options from a .cabal file are not copied into the
      InstalledPackageInfo.  Most uses of cc-options in Cabal are clearly
      intended to be local to the package, but they were being propagated
      everywhere, almost certainly unintentionally.
      
      The way is left open for Cabal to allow packages to specify cc-options
      that get propagated in the future, if we find a use case for this.
      39271273
  17. 13 Aug, 2008 1 commit
  18. 12 Aug, 2008 1 commit
    • Simon Marlow's avatar
      put back -fwarn-depcrecations · 27abb1f5
      Simon Marlow authored
      It was replaced by -fwarn-warnings-deprecations, but I think we want
      to keep it for backwards compatibility.  I'm not sure we want to
      deprecate it either...
      27abb1f5
  19. 13 Aug, 2008 1 commit
  20. 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
  21. 07 Aug, 2008 1 commit
  22. 31 Jul, 2008 2 commits