1. 20 Sep, 2015 1 commit
  2. 17 Sep, 2015 2 commits
  3. 12 Sep, 2015 1 commit
  4. 10 Sep, 2015 1 commit
  5. 02 Sep, 2015 1 commit
    • Eric Seidel's avatar
      Use IP based CallStack in error and undefined · 6740d70d
      Eric Seidel authored
      This patch modifies `error`, `undefined`, and `assertError` to use
      implicit call-stacks to provide better error messages to users.
      
      There are a few knock-on effects:
      
      - `GHC.Classes.IP` is now wired-in so it can be used in the wired-in
        types for `error` and `undefined`.
      
      - `TysPrim.tyVarList` has been replaced with a new function
        `TysPrim.mkTemplateTyVars`. `tyVarList` made it easy to introduce
        subtle bugs when you need tyvars of different kinds. The naive
      
        ```
        tv1 = head $ tyVarList kind1
        tv2 = head $ tyVarList kind2
        ```
      
        would result in `tv1` and `tv2` sharing a `Unique`, thus substitutions
        would be applied incorrectly, treating `tv1` and `tv2` as the same
        tyvar. `mkTemplateTyVars` avoids this pitfall by taking a list of kinds
        and producing a single tyvar of each kind.
      
      - The types `GHC.SrcLoc.SrcLoc` and `GHC.Stack.CallStack` now live in
        ghc-prim.
      
      - The type `GHC.Exception.ErrorCall` has a new constructor
        `ErrorCallWithLocation` that takes two `String`s instead of one, the
        2nd one being arbitrary metadata about the error (but usually the
        call-stack). A bi-directional pattern synonym `ErrorCall` continues to
        provide the old API.
      
      Updates Cabal, array, and haddock submodules.
      
      Reviewers: nh2, goldfire, simonpj, hvr, rwbarton, austin, bgamari
      
      Reviewed By: simonpj
      
      Subscribers: rwbarton, rodlogic, goldfire, maoe, simonmar, carter,
      liyang, bgamari, thomie
      
      Differential Revision: https://phabricator.haskell.org/D861
      
      GHC Trac Issues: #5273
      6740d70d
  6. 18 Aug, 2015 1 commit
    • Michael Snoyman's avatar
      Transliterate unknown characters at output · 22aca536
      Michael Snoyman authored
      This avoids the compiler from crashing when, for example, a warning
      contains a non-Latin identifier and the LANG variable is set to C.
      Fixes #6037.
      
      Test Plan:
      Create a Haskell source file containing an identifier with non-Latin
      characters and no type signature. Compile with `LANG=C ghc -Wall
      foo.hs`, and it should fail. With this patch, it will succeed.
      
      Reviewers: austin, rwbarton, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1153
      
      GHC Trac Issues: #6037, #10762
      22aca536
  7. 12 Aug, 2015 1 commit
    • Tamar Christina's avatar
      Upgrade GCC to 5.2.0 for Windows x86 and x86_64 · 7b211b4e
      Tamar Christina authored
      This patch does a few things
      
      - Moved GHC x86 to MinGW-w64 (Using Awson's patch)
      - Moves Both GHCs to MSYS2 toolchains
      - Completely removes the dependencies on the git tarball repo
        - Downloads only the required tarball for the architecture for
          which we are building
        - Downloads the perl tarball is missing as well
        - Fixed a few bugs in the linker to fix tests on Windows
      
      The links currently point to repo.msys2.org and GitHub, it might be
      more desirable to mirror them on
      http://downloads.haskell.org/~ghc/mingw/ as with the previous patch
      attempt.
      
      For more details on what the MSYS2 packages I include see #10726
      (Awson's comment). but it should contain all we need
      and no python or fortran, which makes the uncompressed tar a 1-2
      hundreds mb smaller.
      
      The `GCC 5.2.0` in the package supports `libgcc` as a shared library,
      this is a problem since
      when compiling with -shared the produced dll now has a dependency on
      `libgcc_s_sjlj-1.dll`.
      To solve this the flag `-static-libgcc` is now being used for all GCC
      calls on windows.
      
      Test Plan:
      ./validate was ran both on x86 and x86_64 windows and compared against
      the baseline.
      
      A few test were failing due to Ld no longer being noisy. These were
      updated.
      
      The changes to the configure script *should* be validated by the build
      bots for the other platforms before landing
      
      Reviewers: simonmar, awson, bgamari, austin, thomie
      
      Reviewed By: thomie
      
      Subscribers: #ghc_windows_task_force, thomie, awson
      
      Differential Revision: https://phabricator.haskell.org/D1123
      
      GHC Trac Issues: #10726, #9014, #9218, #10435
      7b211b4e
  8. 06 Aug, 2015 1 commit
  9. 30 Jul, 2015 1 commit
  10. 27 Jul, 2015 1 commit
    • Adam Sandberg Eriksson's avatar
      Implementation of StrictData language extension · f842ad6c
      Adam Sandberg Eriksson authored
      This implements the `StrictData` language extension, which lets the
      programmer default to strict data fields in datatype declarations on a
      per-module basis.
      
      Specification and motivation can be found at
      https://ghc.haskell.org/trac/ghc/wiki/StrictPragma
      
      This includes a tricky parser change due to conflicts regarding `~` in
      the type level syntax: all ~'s are parsed as strictness annotations (see
      `strict_mark` in Parser.y) and then turned into equality constraints at
      the appropriate places using `RdrHsSyn.splitTilde`.
      
      Updates haddock submodule.
      
      Test Plan: Validate through Harbormaster.
      
      Reviewers: goldfire, austin, hvr, simonpj, tibbe, bgamari
      
      Reviewed By: simonpj, tibbe, bgamari
      
      Subscribers: lelf, simonpj, alanz, goldfire, thomie, bgamari, mpickering
      
      Differential Revision: https://phabricator.haskell.org/D1033
      
      GHC Trac Issues: #8347
      f842ad6c
  11. 23 Jul, 2015 1 commit
    • spinda's avatar
      Generate .dyn_o files for .hsig files with -dynamic-too · d2b4df15
      spinda authored
      With -dynamic-too, .dyn_o files were not being generated for .hsig
      files.  Normally, this is handled in the pipeline; however, the branch
      for .hsig files called compileEmptyStub directly instead of going
      through runPipeline.  When compiling a Cabal package that included .hsig
      files, this triggered a linker error later on, as it expected a .dyn_o
      file to have been generated for each .hsig.
      
      The fix is to use runPipeline for .hsig files, just as with .hs files.
      Alternately, one could duplicate the logic for handling -dynamic-too in
      the .hsig branch, but simply calling runPipeline ends up being much
      cleaner.
      
      Test Plan: validate
      
      Reviewers: austin, ezyang, bgamari, thomie
      
      Reviewed By: ezyang, thomie
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1084
      
      GHC Trac Issues: #10660
      d2b4df15
  12. 21 Jul, 2015 1 commit
  13. 13 Jul, 2015 1 commit
  14. 10 Jul, 2015 1 commit
    • Ben Gamari's avatar
      Fix self-contained handling of ASCII encoding · d69dfba4
      Ben Gamari authored
      D898 was primarily intended to fix hangs in the event that iconv was
      unavailable (namely #10298 and #7695). In addition to this fix, it also
      introduced self-contained handling of ANSI terminals to allow compiled
      executables to run in minimal environments lacking iconv.
      
      However, the behavior that the patch introduced is highly suspicious.
      Specifically, it gives the user a UTF-8 encoding even if they requested
      ASCII.
      
      This has the potential to break quite a lot of code. At very least it
      breaks GHC's Unicode terminal detection logic, which attempts to catch
      an invalid character when encoding a pair of smart-quotes. Of course,
      this exception will never be thrown if a UTF-8 encoder is used.
      
      Here we use the `char8` encoding to handle requests for ASCII encodings
      in the event that we find iconv to be non-functional.
      
      Fixes #10623.
      
      Test Plan: Validate with T8959a
      
      Reviewers: rwbarton, hvr, austin, hsyl20
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1059
      
      GHC Trac Issues: #10623
      d69dfba4
  15. 04 Jul, 2015 1 commit
  16. 26 Jun, 2015 2 commits
  17. 11 Jun, 2015 3 commits
  18. 04 Jun, 2015 1 commit
    • thomie's avatar
      Testsuite: add/fix cleanup for certain tests · e340f6ec
      thomie authored
      * extra_clean argument should be a list
        Add an assert to prevent regressions.
      
      * properly clean package conf direcories
        They are directories now, which was causing problems.
      
      * properly clean write_interface_* tests
        We were getting these errors:
      
        [Errno 21] Is a directory: './driver/write_interface_oneshot'
        [Errno 39] Directory not empty: './driver/write_interface_oneshot'
        [Errno 21] Is a directory: './driver/write_interface_make'
        [Errno 39] Directory not empty: './driver/write_interface_make'
      
      * outputdir() is better than -outputdir, as it knows how to (pre)clean
        itself.
      e340f6ec
  19. 02 Jun, 2015 1 commit
  20. 01 Jun, 2015 1 commit
  21. 29 May, 2015 1 commit
  22. 22 Apr, 2015 1 commit
  23. 07 Apr, 2015 3 commits
    • Edward Z. Yang's avatar
      Axe one-shot sig-of · 1d5c887c
      Edward Z. Yang authored
      Summary:
      We're getting rid of -sig-of foo:A usage, because
      it doesn't make sense in any compilation mode besides one-shot,
      and we don't expect users to use it anyway.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D789
      1d5c887c
    • Edward Z. Yang's avatar
      Support for multiple signature files in scope. · a7524eae
      Edward Z. Yang authored
      Summary:
      A common pattern when programming with signatures is to combine multiple
      signatures together (signature linking).  We achieve this by making it
      not-an-error to have multiple, distinct interface files for the same module
      name, as long as they have the same backing implementation.  When a user
      imports a module name, they get ALL matching signatures dumped into their
      scope.
      
      On the way, I refactored the module finder code, which now distinguishes
      between exact finds (when you had a 'Module') and regular finds (when
      you had a 'ModuleName').  I also refactored the package finder code to
      use a Monoid instance on LookupResult to collect together various results.
      
      ToDo: At the moment, if a signature is declared in the local package,
      it completely overrides any remote signatures.  Eventually, we'll want
      to also pull in the remote signatures (or even override the local signature,
      if the full implementation is available.)  There are bunch of ToDos in the
      code for what to do once this is done.
      
      ToDo: At the moment, whenever a module name lookup occurs in GHCi and we
      would have seen a signature, we instead continue and return the Module
      for the backing implementation.  This is correct for most cases, but there
      might be some situations where we want something a little more fine-grained
      (e.g. :browse should only list identifiers which are available through
      the in-scope signatures, and not ALL of them.)
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: simonpj, hvr, austin
      
      Subscribers: carter, thomie
      
      Differential Revision: https://phabricator.haskell.org/D790
      
      GHC Trac Issues: #9252
      a7524eae
    • Simon Peyton Jones's avatar
      Put quotes round a Name in an error message · 6ca7b847
      Simon Peyton Jones authored
      Cosmetic consistency only
      6ca7b847
  24. 02 Apr, 2015 1 commit
  25. 01 Apr, 2015 1 commit
    • thomie's avatar
      Change which files --make thinks are 'Haskellish' (#10220) · 7cec6c7b
      thomie authored
      `.hspp` and `.hscpp` are haskell files that have already been preprocessed.
      
      Treat `.hspp` and `.hscpp` as Haskellish sources again, as they were before
      commit a10e1990. This way, ghc --make will load their imports.
      
      Make sure that `.cmm` and `.cmmcpp` are still not treated as Haskellish,
      by moving them out of `haskell_src_suffixes` (but still keeping them in
      haskellish_suffixes, though I'm not sure what the purpose of that group
      is).
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D778
      7cec6c7b
  26. 31 Mar, 2015 2 commits
  27. 16 Mar, 2015 1 commit
    • thomie's avatar
      Dont call unsafeGlobalDynFlags if it is not set · 5166ee94
      thomie authored
      Parsing of static and mode flags happens before any session is started,
      i.e., before the first call to 'GHC.withGhc'. Therefore, to report
      errors for invalid usage of these two types of flags, we can not call
      any function that needs DynFlags, as there are no DynFlags available yet
      (unsafeGlobalDynFlags is not set either). So we always print "on the
      commandline" as the location, which is true except for Api users, which
      is probably ok.
      
      When reporting errors for invalid usage of dynamic flags we /can/ make
      use of DynFlags, and we do so explicitly in
      DynFlags.parseDynamicFlagsFull.
      
      Before, we called unsafeGlobalDynFlags when an invalid (combination of)
      flag(s) was given on the commandline, resulting in panics (#9963). This
      regression was introduced in 1d6124de.
      
      Also rename showSDocSimple to showSDocUnsafe, to hopefully prevent this
      from happening again.
      
      Reviewed By: austin
      
      Differential Revision: https://phabricator.haskell.org/D730
      
      GHC Trac Issues: #9963
      5166ee94
  28. 23 Feb, 2015 1 commit
    • thomie's avatar
      Declare some Makefile targets to be PHONY · a0ef626e
      thomie authored
      Summary:
      Given:
        a Makefile with a non-PHONY target called `target`
      If:
        after running `make target`, a file exists with the same name as `target`
        (it was either already there, or it was created by running `make target`)
      And:
        `target` has no dependencies, such as `clean`, that modify or delete that
        file
      Then:
        subsequent invocations of `make target` will not have any effect.
      
      Solution: make `target` PHONY.
      
      BAD:
        ```
        foo:
                ...
                ./foo
        ```
      
      BETTER:
        ```
        foo:
                ...
                ./foo
        .PHONY: foo
        ```
      
      Reviewers: austin
      
      Reviewed By: austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D670
      a0ef626e
  29. 07 Jan, 2015 1 commit
  30. 06 Jan, 2015 1 commit
    • Simon Peyton Jones's avatar
      Modify a couple of error messages slightly · 00e1fc1b
      Simon Peyton Jones authored
      In particular
        In the type signature for:
           f :: Int -> Int
      I added the colon
      
      Also reword the "maybe you haven't applied a function to enough arguments?"
      suggestion to make grammatical sense.
      
      These tiny changes affect a lot of error messages.
      00e1fc1b
  31. 03 Jan, 2015 3 commits