1. 30 Dec, 2019 1 commit
  2. 07 Nov, 2019 1 commit
  3. 15 Aug, 2019 1 commit
    • James Foster's avatar
      Remove unused imports of the form 'import foo ()' (Fixes #17065) · ca71d551
      James Foster authored
      These kinds of imports are necessary in some cases such as
      importing instances of typeclasses or intentionally creating
      dependencies in the build system, but '-Wunused-imports' can't
      detect when they are no longer needed. This commit removes the
      unused ones currently in the code base (not including test files
      or submodules), with the hope that doing so may increase
      parallelism in the build system by removing unnecessary
      dependencies.
      ca71d551
  4. 15 Mar, 2019 1 commit
  5. 02 Mar, 2018 1 commit
    • niteria's avatar
      Cache the fingerprint of sOpt_P · b8f03bbe
      niteria authored
      Before this change we would compute a hash of
      all the command line -optP flags once per file.
      With a lot of files and many -optP flags, that's a lot
      of repeated work.
      
      I added a new Note that explains the approach and rationale.
      
      Test Plan: new test
      
      Reviewers: simonmar, simonpj, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, thomie, carter
      
      GHC Trac Issues: #14697
      
      Differential Revision: https://phabricator.haskell.org/D4445
      b8f03bbe
  6. 20 Feb, 2018 1 commit
    • Tamar Christina's avatar
      Change how includes for input file directory works · eb2daa2b
      Tamar Christina authored
      GHC Used to only allow for one include mode, namely `-I`.  The problem
      with `-I` includes is that it supercedes all other includes, including
      the system include paths.
      
      This is not a problem for paths requested by the user, but it is a
      problem for the ones we implicitly derive and add.
      
      In particular we add the source directory of the input file to the
      include path. This is problematic because it causes any file with the
      name of a system include, to inadvertently loop as the wrong file gets
      included.
      
      Since this is an implicitly include, and as far as I can tell, only done
      so local includes are found (as the sources given to GCC reside in a
      temp folder) then switch from `-I` to `-iquote`.
      
      This requires a submodule update for haddock
      
      Test Plan: ./validate
      
      Reviewers: austin, bgamari, hvr
      
      Reviewed By: bgamari
      
      Subscribers: carter, rwbarton, thomie
      
      GHC Trac Issues: #14312
      
      Differential Revision: https://phabricator.haskell.org/D4080
      eb2daa2b
  7. 11 Dec, 2017 1 commit
    • David Feuer's avatar
      Allow users to ignore optimization changes · 708ed9ca
      David Feuer authored
      * Add a new flag, `-fignore-optim-changes`, allowing them to avoid
        recompilation if the only changes are to the `-O` level or to
        flags controlling optimizations.
      
      * When `-fignore-optim-changes` is *off*, recompile when optimization
        flags (e.g., `-fno-full-laziness`) change. Previously, we ignored
        these unconditionally when deciding whether to recompile a module.
      
      Reviewers: austin, bgamari, simonmar
      
      Reviewed By: simonmar
      
      Subscribers: duog, carter, simonmar, rwbarton, thomie
      
      GHC Trac Issues: #13604
      
      Differential Revision: https://phabricator.haskell.org/D4123
      708ed9ca
  8. 19 Sep, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      compiler: introduce custom "GhcPrelude" Prelude · f63bc730
      Herbert Valerio Riedel authored
      This switches the compiler/ component to get compiled with
      -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
      modules.
      
      This is motivated by the upcoming "Prelude" re-export of
      `Semigroup((<>))` which would cause lots of name clashes in every
      modulewhich imports also `Outputable`
      
      Reviewers: austin, goldfire, bgamari, alanz, simonmar
      
      Reviewed By: bgamari
      
      Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D3989
      f63bc730
  9. 03 Jul, 2017 1 commit
  10. 26 Mar, 2017 1 commit
  11. 15 Mar, 2017 1 commit
  12. 17 Feb, 2017 1 commit
    • Edward Z. Yang's avatar
      Fix a Backpack recompilation avoidance bug when signatures change. · ca543154
      Edward Z. Yang authored
      Summary:
      Recompilation avoidance checks if -this-unit-id has changed by relying
      on the "wanted module" check in readIface ("Something is amiss...").
      Unfortunately, this check didn't check if the instantiation made
      sense, which meant that if you changed the signatures of a Backpack
      package, we'd still treat the old signatures as up-to-date.
      
      The way I fixed this was by having findAndReadIface take in a 'Module'
      representing the /actual/ module we were intending to lookup.  We
      convert this into the 'Module' we expect to see in 'mi_module' and
      now do a more elaborate check that will also verify that instantiations
      make sense.
      
      Along the way, I robustified the logging infrastructure for
      recompilation checking, and folded wrongIfaceModErr (which
      was dead code) into the error message.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: bgamari, austin
      
      Subscribers: thomie, snowleopard
      
      Differential Revision: https://phabricator.haskell.org/D3130
      ca543154
  13. 14 Oct, 2016 1 commit
    • Ben Gamari's avatar
      Clean up handling of known-key Names in interface files · 34d933d6
      Ben Gamari authored
      Previously BinIface had some dedicated logic for handling tuple names in
      the symbol table. As it turns out, this logic was essentially dead code
      as it was superceded by the special handling of known-key things. Here
      we cull the tuple code-path and use the known-key codepath for all
      tuple-ish things.
      
      This had a surprising number of knock-on effects,
      
       * constraint tuple datacons had to be made known-key (previously they
         were not)
      
       * IfaceTopBndr was changed from being a synonym of OccName to a
         synonym of Name (since we now need to be able to deserialize Names
         directly from interface files)
      
       * the change to IfaceTopBndr complicated fingerprinting, since we need
         to ensure that we don't go looking for the fingerprint of the thing
         we are currently fingerprinting in the fingerprint environment (see
         notes in MkIface). Handling this required distinguishing between
         binding and non-binding Name occurrences in the Binary serializers.
      
       * the original name cache logic which previously lived in IfaceEnv has
         been moved to a new NameCache module
      
       * I ripped tuples and sums out of knownKeyNames since they introduce a
         very large number of entries. During interface file deserialization
         we use static functions (defined in the new KnownUniques module) to
         map from a Unique to a known-key Name (the Unique better correspond
         to a known-key name!) When we need to do an original name cache
         lookup we rely on the parser implemented in isBuiltInOcc_maybe.
      
       * HscMain.allKnownKeyNames was folded into PrelInfo.knownKeyNames.
      
       * Lots of comments were sprinkled about describing the new scheme.
      
      Updates haddock submodule.
      
      Test Plan: Validate
      
      Reviewers: niteria, simonpj, austin, hvr
      
      Reviewed By: simonpj
      
      Subscribers: simonmar, niteria, thomie
      
      Differential Revision: https://phabricator.haskell.org/D2467
      
      GHC Trac Issues: #12532, #12415
      34d933d6
  14. 02 Sep, 2016 1 commit
  15. 16 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Some alpha renaming · cd33eefd
      ian@well-typed.com authored
      Mostly d -> g (matching DynFlag -> GeneralFlag).
      Also renamed if* to when*, matching the Haskell if/when names
      cd33eefd
  16. 24 Jul, 2012 1 commit
  17. 16 Jul, 2012 2 commits
    • Ian Lynagh's avatar
      Make -fPIC a dynamic flag · cdf946e4
      Ian Lynagh authored
      Hopefully I've kept the logic the same, and we now generate warnings if
      the user does -fno-PIC but we ignore them (e.g. because they're on OS X
      amd64).
      cdf946e4
    • Ian Lynagh's avatar
      Make a picPOpts function · 5d0fce85
      Ian Lynagh authored
      We now handle the preprocessor options the same way as the gcc options
      (picCCOpts).
      5d0fce85
  18. 01 Mar, 2012 1 commit
  19. 16 Feb, 2012 2 commits
  20. 03 Jan, 2012 1 commit
    • Simon Marlow's avatar
      Don't record outputFile in the hashed flags · f283c391
      Simon Marlow authored
      We don't want
      
          ghc --make M -o <file>
      
      to force recompilation of all modules when <file> changes.  The -o
      value is already taken into account by the recompilation machinery
      when we check the modification time on the object file or the
      executable.
      f283c391
  21. 07 Dec, 2011 1 commit
  22. 23 Nov, 2011 1 commit
  23. 11 Nov, 2011 1 commit
  24. 10 Nov, 2011 3 commits