Skip to content
Snippets Groups Projects
  1. Mar 08, 2024
  2. Feb 13, 2024
  3. Dec 29, 2023
  4. Aug 04, 2023
    • Aaron Allen's avatar
      [#23663] Show Flag Suggestions in GHCi · a1899d8f
      Aaron Allen authored and Marge Bot's avatar Marge Bot committed
      Makes suggestions when using `:set` in GHCi with a misspelled flag. This
      mirrors how invalid flags are handled when passed to GHC directly. Logic
      for producing flag suggestions was moved to GHC.Driver.Sesssion so it
      can be shared.
      
      resolves #23663
      a1899d8f
  5. May 26, 2023
    • Matthew Pickering's avatar
      error messages: Don't display ghci specific hints for missing packages · 34b44f7d
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Tickets like #22884 suggest that it is confusing that GHC used on the
      command line can suggest options which only work in GHCi.
      
      This ticket uses the error message infrastructure to override certain
      error messages which displayed GHCi specific information so that this
      information is only showed when using GHCi.
      
      The main annoyance is that we mostly want to display errors in the same
      way as before, but with some additional information. This means that the
      error rendering code has to be exported from the Iface/Errors/Ppr.hs
      module.
      
      I am unsure about whether the approach taken here is the best or most
      maintainable solution.
      
      Fixes #22884
      34b44f7d
  6. Apr 25, 2023
  7. Apr 18, 2023
    • Matthew Pickering's avatar
      Convert interface file loading errors into proper diagnostics · 5e1d33d7
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This patch converts all the errors to do with loading interface files
      into proper structured diagnostics.
      
      * DriverMessage: Sometimes in the driver we attempt to load an interface
        file so we embed the IfaceMessage into the DriverMessage.
      * TcRnMessage: Most the time we are loading interface files during
        typechecking, so we embed the IfaceMessage
      
      This patch also removes the TcRnInterfaceLookupError constructor which
      is superceded by the IfaceMessage, which is now structured compared to
      just storing an SDoc before.
      5e1d33d7
  8. Apr 08, 2023
  9. Sep 13, 2022
    • sheaf's avatar
      Diagnostic codes: acccept test changes · 362cca13
      sheaf authored and Marge Bot's avatar Marge Bot committed
      The testsuite output now contains diagnostic codes, so many tests need
      to be updated at once.
      We decided it was best to keep the diagnostic codes in the testsuite
      output, so that contributors don't inadvertently make changes to the
      diagnostic codes.
      362cca13
  10. Feb 06, 2022
  11. Nov 17, 2021
    • MorrowM's avatar
      Improve handling of import statements in GHCi (#20473) · 7850142c
      MorrowM authored and Zubin's avatar Zubin committed
      Currently in GHCi, when given a line of user input we:
      
      1. Attempt to parse and handle it as a statement
      2. Otherwise, attempt to parse and handle a single import
      3. Otherwise, check if there are imports present (and if so display an error message)
      4. Otherwise, attempt to parse a module and only handle the declarations
      
      This patch simplifies the process to:
      
      Attempt to parse and handle it as a statement
      Otherwise, attempt to parse a module and handle the imports and declarations
      
      This means that multiple imports in a multiline are now accepted, and a multiline containing both imports and declarations is now accepted (as well as when separated by semicolons).
      7850142c
  12. Sep 01, 2020
  13. Feb 08, 2020
  14. Jan 30, 2019
  15. Sep 16, 2018
  16. Feb 26, 2017
  17. Oct 08, 2016
  18. Jun 29, 2016
    • Thomas Miedema's avatar
      Testsuite: use ignore_stderr/stdout instead of ignore_output · 1084d375
      Thomas Miedema authored
      The problem with ignore_output is that it hides errors for WAY=ghci.
      GHCi always returns with exit code 0 (unless it is broken itself).
      
      For example: ghci015 must have been failing with compile errors for
      years, but we didn't notice because all output was ignored.
      
      Therefore, replace all uses of ignore_output with either ignore_stderr
      or ignore_stdout. In some cases I opted for adding the expected output.
      
      Update submodule hpc and stm.
      
      Reviewed by: simonmar
      
      Differential Revision: https://phabricator.haskell.org/D2367
      1084d375
  19. Jun 28, 2016
    • Thomas Miedema's avatar
      Testsuite: open/close stdin/stdout/stderr explicitly · 58f0086b
      Thomas Miedema authored
      This allows run_command's to contain `|`, and `no_stdin` isn't necessary
      anymore.
      
      Unfortunately it doesn't fix T7037 on Windows which I had hoped it would
      (testsuite driver tries to read a file that it just created itself, but
      the OS says it doesn't exist).
      
      The only drawback of this commit is that the command that the testsuite
      prints to the terminal (for debugging purposes) doesn't mention the
      files that stdout and stderr are redirected to anymore. This is probably
      ok.
      
      Update submodule unix.
      
      Differential Revision: https://phabricator.haskell.org/D1234
      58f0086b
  20. Jan 27, 2016
  21. Jan 22, 2016
  22. Dec 21, 2015
  23. Nov 13, 2015
    • Simon Marlow's avatar
      Make 'error' include the CCS call stack when profiled · 8988be85
      Simon Marlow authored
      Summary:
      The idea here is that this gives a more detailed stack trace in two
      cases:
      
      1. With `-prof` and `-fprof-auto`
      2. In GHCi (see #11047)
      
      Example, with an error inserted in nofib/shootout/binary-trees:
      
      ```
      $ ./Main 3
      Main: z
      CallStack (from ImplicitParams):
        error, called at Main.hs:67:29 in main:Main
      CallStack (from -prof):
        Main.check' (Main.hs:(67,1)-(68,82))
        Main.check (Main.hs:63:1-21)
        Main.stretch (Main.hs:32:35-57)
        Main.main.c (Main.hs:32:9-57)
        Main.main (Main.hs:(27,1)-(43,42))
        Main.CAF (<entire-module>)
      ```
      
      This doesn't quite obsolete +RTS -xc, which also attempts to display
      more information in the case when the error is in a CAF, but I'm
      exploring other solutions to that.
      
      Includes submodule updates.
      
      Test Plan: validate
      
      Reviewers: simonpj, ezyang, gridaphobe, bgamari, hvr, austin
      
      Reviewed By: bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1426
      8988be85
  24. Nov 07, 2015
    • Simon Marlow's avatar
      Make GHCi & TH work when the compiler is built with -prof · ce1f1607
      Simon Marlow authored
      Summary:
      Amazingly, there were zero changes to the byte code generator and very
      few changes to the interpreter - mainly because we've used good
      abstractions that hide the differences between profiling and
      non-profiling.  So that bit was pleasantly straightforward, but there
      were a pile of other wibbles to get the whole test suite through.
      
      Note that a compiler built with -prof is now like one built with
      -dynamic, in that to use TH you have to build the code the same way.
      For dynamic, we automatically enable -dynamic-too when TH is required,
      but we don't have anything equivalent for profiling, so you have to
      explicitly use -prof when building code that uses TH with a profiled
      compiler.  For this reason Cabal won't work with TH.  We don't expect
      to ship a profiled compiler, so I think that's OK.
      
      Test Plan: validate with GhcProfiled=YES in validate.mk
      
      Reviewers: goldfire, bgamari, rwbarton, austin, hvr, erikd, ezyang
      
      Reviewed By: ezyang
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1407
      
      GHC Trac Issues: #4837, #545
      ce1f1607
  25. Sep 22, 2015
  26. Jul 17, 2015
    • Thomas Miedema's avatar
      Testsuite: small test cleanups · ac0feece
      Thomas Miedema authored
      * don't print anything to stdout
      * add missing Makefile
      * also ignore mk/ghcconfig*.mk when using installed compiler
      * prevent warning: -rtsopts and -with-rtsopts have no effect with -shared
      ac0feece
  27. May 31, 2015
  28. Feb 10, 2015
  29. Dec 23, 2014
  30. Jul 07, 2014
  31. Feb 25, 2014
  32. Dec 05, 2013
  33. Feb 24, 2013
  34. Feb 11, 2013
  35. Jan 25, 2013
  36. Jan 16, 2013
Loading