1. 20 Jun, 2019 1 commit
    • John Ericson's avatar
      Move 'Platform' to ghc-boot · bff2f24b
      John Ericson authored
      ghc-pkg needs to be aware of platforms so it can figure out which
      subdire within the user package db to use. This is admittedly
      roundabout, but maybe Cabal could use the same notion of a platform as
      GHC to good affect too.
      bff2f24b
  2. 14 Jun, 2018 1 commit
    • Vladislav Zavialov's avatar
      Embrace -XTypeInType, add -XStarIsType · d650729f
      Vladislav Zavialov authored
      Summary:
      Implement the "Embrace Type :: Type" GHC proposal,
      .../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst
      
      GHC 8.0 included a major change to GHC's type system: the Type :: Type
      axiom. Though casual users were protected from this by hiding its
      features behind the -XTypeInType extension, all programs written in GHC
      8+ have the axiom behind the scenes. In order to preserve backward
      compatibility, various legacy features were left unchanged. For example,
      with -XDataKinds but not -XTypeInType, GADTs could not be used in types.
      Now these restrictions are lifted and -XTypeInType becomes a redundant
      flag that will be eventually deprecated.
      
      * Incorporate the features currently in -XTypeInType into the
        -XPolyKinds and -XDataKinds extensions.
      * Introduce a new extension -XStarIsType to control how to parse * in
        code and whether to print it in error messages.
      
      Test Plan: Validate
      
      Reviewers: goldfire, hvr, bgamari, alanz, simonpj
      
      Reviewed By: goldfire, simonpj
      
      Subscribers: rwbarton, thomie, mpickering, carter
      
      GHC Trac Issues: #15195
      
      Differential Revision: https://phabricator.haskell.org/D4748
      d650729f
  3. 19 Mar, 2018 1 commit
    • Andrew Martin's avatar
      Implement -dword-hex-literals · a00b88b9
      Andrew Martin authored
      Provide flag for showing showing Word# and Word64# as hexadecimal when
      dumping GHC core.  The only affects Word, not Int, and it prefixes the
      hexadecimal with enough zeroes to make the total character count a power
      of two. For example:
      
      - 0x0C0C instead of 0xC0C
      - 0x00BA00BA instead of 0xBA00BA
      
      This also affects the presentation of Word# and Word64# in GHC's error
      messages. It is not expected that the flag will be used for this, but
      it is a side-effect worth noting.
      
      Test Plan: none
      
      Reviewers: bgamari, simonpj
      
      Reviewed By: simonpj
      
      Subscribers: simonpj, mpickering, rwbarton, thomie, carter, andrewthad
      
      GHC Trac Issues: #14872
      
      Differential Revision: https://phabricator.haskell.org/D4465
      a00b88b9
  4. 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
  5. 24 Mar, 2017 1 commit
    • Rufflewind's avatar
      Allow colors to be customized · adf27d61
      Rufflewind authored
      Allow customization of diagnostic colors through the GHC_COLORS
      environment variable.  Some color-related code have been refactored to
      PprColour to reduce the circular dependence between DynFlags,
      Outputable, ErrUtils.  Some color functions that were part of Outputable
      but were never used have been deleted.
      
      Test Plan: validate
      
      Reviewers: austin, hvr, bgamari, dfeuer
      
      Reviewed By: bgamari, dfeuer
      
      Subscribers: dfeuer, rwbarton, thomie, snowleopard
      
      Differential Revision: https://phabricator.haskell.org/D3364
      adf27d61
  6. 03 Feb, 2017 1 commit
    • Sylvain Henry's avatar
      Ditch static flags · bbd3c399
      Sylvain Henry authored
      This patch converts the 4 lasting static flags (read from the command
      line and unsafely stored in immutable global variables) into dynamic
      flags. Most use cases have been converted into reading them from a DynFlags.
      
      In cases for which we don't have easy access to a DynFlags, we read from
      'unsafeGlobalDynFlags' that is set at the beginning of each 'runGhc'.
      It's not perfect (not thread-safe) but it is still better as we can
      set/unset these 4 flags before each run when using GHC API.
      
      Updates haddock submodule.
      
      Rebased and finished by: bgamari
      
      Test Plan: validate
      
      Reviewers: goldfire, erikd, hvr, austin, simonmar, bgamari
      
      Reviewed By: simonmar
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2839
      
      GHC Trac Issues: #8440
      bbd3c399
  7. 30 Jan, 2017 1 commit
    • Matthew Pickering's avatar
      Add a flag to emit error messages as JSON · 91691117
      Matthew Pickering authored
      This patch adds the flag `-ddump-json` which dumps all the compiler
      output as a JSON array. This allows tooling to more easily parse GHC's
      output to display to users.
      
      The flag is currently experimental and will hopefully be refined for the
      next release.  In particular I have avoided any changes which involve
      significant refactoring and provided what is easy given the current
      infrastructure.
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: DanielG, gracjan, thomie
      
      Differential Revision: https://phabricator.haskell.org/D3010
      
      GHC Trac Issues: #13190
      91691117
  8. 29 Nov, 2016 1 commit
    • Rufflewind's avatar
      Make diagnostics slightly more colorful · f1fc8cbf
      Rufflewind authored
      This is a preliminary commit to add colors to diagnostics (warning and
      error messages).  The aesthetic changes are:
      
        - 'warning', 'error', and 'fatal' are all colored magenta, red, and
          red respectively.
        - The warning annotation [-Wsomething] shares the same color.
        - Warnings and errors are also bolded (this is consistent with what
          other compilers do).
      
      A new flag has been added to control the behavior:
      
          -fdiagnostics-color=(always|auto|never)
      
      This flag is 'auto' by default.  However, auto-detection is not
      implemented yet, so it effectively it defaults to off.
      
      Test Plan: validate
      
      Reviewers: austin, bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D2716
      
      GHC Trac Issues: #8809
      f1fc8cbf
  9. 06 Jun, 2014 2 commits
  10. 24 Feb, 2013 1 commit
  11. 29 Jan, 2013 1 commit
  12. 08 Oct, 2012 1 commit
    • ian@well-typed.com's avatar
      Put the DynFlags in a global variable for tracing; fixes #7304 · f7cd14fd
      ian@well-typed.com authored
      This is an ugly kludge to make a DynFlags value available for the
      'trace' functions. It may not be the value we really ought to use,
      but it'll be good enough for the pretty-printer to use.
      
      Ideally we'd pass the real DynFlags down to all the trace calls,
      but this will do for now at least.
      f7cd14fd
  13. 18 Jun, 2012 1 commit
  14. 14 Jun, 2012 1 commit
  15. 13 Jun, 2012 1 commit
    • Ian Lynagh's avatar
      Remove PlatformOutputable · d06edb8e
      Ian Lynagh authored
      We can now get the Platform from the DynFlags inside an SDoc, so we
      no longer need to pass the Platform in.
      d06edb8e
  16. 12 Jun, 2012 1 commit
  17. 11 Jun, 2012 1 commit