1. 02 Dec, 2011 1 commit
    • Simon Marlow's avatar
      More changes aimed at improving call stacks. · 1469f1eb
      Simon Marlow authored
        - Attach a SrcSpan to every CostCentre.  This had the side effect
          that CostCentres that used to be merged because they had the same
          name are now considered distinct; so I had to add a Unique to
          CostCentre to give them distinct object-code symbols.
      
        - New flag: -fprof-auto-calls.  This flag adds an automatic SCC to
          every call site (application, to be precise).  This is typically
          more useful for call stacks than annotating whole functions.
      
      Various tidy-ups at the same time: removed unused NoCostCentre
      constructor, and refactored a bit in Coverage.lhs.
      
      The call stack we get from traceStack now looks like this:
      
      Stack trace:
        Main.CAF (<entire-module>)
        Main.main.xs (callstack002.hs:18:12-24)
        Main.map (callstack002.hs:13:12-16)
        Main.map.go (callstack002.hs:15:21-34)
        Main.map.go (callstack002.hs:15:21-23)
        Main.f (callstack002.hs:10:7-43)
      1469f1eb
  2. 06 Oct, 2011 1 commit
  3. 04 Oct, 2011 1 commit
  4. 29 Sep, 2011 1 commit
  5. 26 Aug, 2011 1 commit
    • Simon Marlow's avatar
      Clean up the handling of the import and :module commands in GHCi · 79d6745f
      Simon Marlow authored
      Previously we remembered the whole history of commands and replayed
      them on every :load/:reload, which lead to some non-linear performance
      characteristics (#5317).  The handling of the implicit Prelude import
      and the implicit imports of recently loaded modules was also
      complicated and wrong in various obscure ways.
      
      The Prelude import works just like the implicit Prelude import in a
      Haskell module: it can be overriden with an explicit Prelude
      import.
      
      I have added a new ":show imports" command to show which imports are
      currently in force.
      
      Prelude> :show imports
      import Prelude -- implicit
      Prelude> import Prelude ()
      Prelude> :show imports
      import Prelude ()
      Prelude> map
      
      <interactive>:0:1: Not in scope: `map'
      Prelude>
      
      Full documentation in the User's Guide.
      
      There are various other little tweaks and improvements, such as when a
      module is imported with 'as', we now show the 'as' name in the prompt
      rather than the original name.
      79d6745f
  6. 22 Aug, 2011 2 commits
  7. 26 Jun, 2011 1 commit
  8. 31 May, 2011 2 commits
  9. 26 Feb, 2011 1 commit
    • vivian's avatar
      :script file scripts in GHCi #1363 · eccb2d89
      vivian authored
      This patch adds the script command in GHCi
      
      A file is read and executed as a series of GHCi commands.
      
      Execution terminates on the first error.  The filename and
      line number are included in the error.
      eccb2d89
  10. 06 Jan, 2011 1 commit
  11. 05 Nov, 2010 1 commit
    • vivian's avatar
      multiline commands in GHCi #4316 · 4edbeb14
      vivian authored
      This patch adds support for multiline commands in GHCi.
      
      The first line of input is lexed.  If there is an active
      layout context once the lexer reaches the end of file, the
      user is prompted for more input.
      
      Multiline input is exited by an empty line and can be escaped 
      with a user interrupt.
      
      Multiline mode is toggled with `:set +m`
      4edbeb14
  12. 13 Oct, 2010 1 commit
  13. 20 Oct, 2010 1 commit
  14. 08 Jul, 2010 1 commit
  15. 25 Jun, 2010 1 commit
  16. 12 Jun, 2010 1 commit
  17. 25 May, 2010 1 commit
  18. 01 Dec, 2009 1 commit
  19. 17 Nov, 2009 1 commit
  20. 31 Oct, 2008 1 commit
  21. 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
  22. 05 Aug, 2008 1 commit
  23. 11 Jul, 2008 1 commit
  24. 09 Jul, 2008 1 commit
    • Simon Marlow's avatar
      #1205: ':load foo.hs' in GHCi always compiles to bytecode · 3897d02a
      Simon Marlow authored
      So now
      
        :load foo.hs       loads bytecode for foo.hs, even if foo.o exists
        :load foo          is just shorthand for :load foo.hs
        :load M            loads a module M, as object code if possible
                           (no change here)
      
        :set -fobject-code
        :load foo.hs       loads foo.hs as object code; an existing foo.o
                           can be used.
        
      This turned out to be very straightforward: when building the
      ModSummary for a file (summariseFile) we just ignore the object file
      unless -fobject-code is on.
      3897d02a
  25. 01 May, 2008 1 commit
  26. 26 Feb, 2008 2 commits
  27. 23 Jan, 2008 1 commit
    • Simon Marlow's avatar
      FIX #1838, #1987: change where GHCi searches for config files · f6efe0c7
      Simon Marlow authored
      6.6 behaviour:
        - ./.ghci
        - $HOME/.ghci
      
      6.8.[12] behaviour:
        - ./.ghci
        - Windows: c:/Documents and Settings/<user>/.ghci
        - Unix: $HOME/.ghci
      
      6.10 (and 6.8.3 when this is merged):
        - ./.ghci
        - Windows: c:/Documents and Settings/<user>/Application Data/ghc/ghci.conf
        - Unix: $HOME/.ghc/ghci.conf
        - $HOME/.ghci
      
      We will need to document this in the 6.8.3 release notes because it
      may affect Windows users who have adapted their setup to 6.8.[12].
      f6efe0c7
  28. 19 Jan, 2008 1 commit
    • Ian Lynagh's avatar
      Add :run and tweak :main · c24bd1bb
      Ian Lynagh authored
      You can now give :main a Haskell [String] as an argument, e.g.
      :main ["foo", "bar"]
      and :run is a variant that takes the name of the function to run.
      Also, :main now obeys the -main-is flag.
      c24bd1bb
  29. 25 Nov, 2007 1 commit
    • Ian Lynagh's avatar
      MERGED: Make ":" in GHCi repeat the last command · d2b3daa3
      Ian Lynagh authored
      Ian Lynagh <igloo@earth.li>**20071124231857
       It used to be a synonym for ":r" in 6.6.1, but this wasn't documented or
       known about by the developers. In 6.8.1 it was accidentally broken.
       This patch brings it back, but as "repeat the last command", similar to
       pressing enter in gdb. This is almost as good for people who want it to
       reload, and means that it can also be used to repeat commands like :step.
      d2b3daa3
  30. 20 Nov, 2007 1 commit
  31. 08 Nov, 2007 1 commit
  32. 11 Nov, 2007 1 commit
  33. 07 Nov, 2007 2 commits
    • Simon Marlow's avatar
      FIX #1765, #1766 · da4dda13
      Simon Marlow authored
      - :def! now overwrites a previous command with the same name
      - :def on its own lists the defined macros
      - ":undef f g" undefines both f and g
      da4dda13
    • Simon Marlow's avatar
      #1617: Add :browse! and various other additions to GHCi · 806ab633
      Simon Marlow authored
         
        - :browse!
          a variant of :browse that lists children separately,
          not in context, and gives import qualifiers in comments
      
      SimonM: I also added sorting by source location for interpreted
      modules in :browse, and alphabetic sorting by name otherwise.  For
      :browse *M, the locally-defined names come before the external ones.
      
        - :{ ..lines.. :} (multiline commands)
          allow existing commands to be spread over multiple lines
          to improve readability, both interactively and in .ghci
          (includes a refactoring that unifies the previous three
          command loops into one, runCommands, fed from cmdqueue,
          file, or readline)
      
        - :set
            now shows GHCi-specific flag settings (printing/
            debugger), as well as non-language dynamic flag 
            settings
          :show languages
            show active language flags
          :show packages
            show active package flags as well as implicitly 
            loaded packages
      806ab633
  34. 07 Oct, 2007 1 commit
  35. 19 Oct, 2007 1 commit
  36. 12 Sep, 2007 1 commit