1. 25 Apr, 2007 2 commits
  2. 24 Apr, 2007 1 commit
  3. 22 Apr, 2007 3 commits
    • simonpj@microsoft.com's avatar
      Fixes to datacon wrappers for indexed data types · 70918cf4
      simonpj@microsoft.com authored
      nominolo@gmail.com pointed out (Trac #1204) that indexed data types
      aren't quite right. I investigated and found that the wrapper
      functions for indexed data types, generated in MkId, are really very
      confusing.  In particular, we'd like these combinations to work
      	newtype + indexed data type
      	GADT + indexted data type
      The wrapper situation gets a bit complicated!  
      
      I did a bit of refactoring, and improved matters, I think.  I am not
      certain that I have gotten it right yet, but I think it's better.
      I'm committing it now becuase it's been on my non-backed-up laptop for
      a month and I want to get it into the repo. I don't think I've broken
      anything, but I don't regard it as 'done'.
      70918cf4
    • simonpj@microsoft.com's avatar
      Fix corner case of useless constraint in SPECIALISE pragma · e5ca7e6e
      simonpj@microsoft.com authored
      	MERGE TO STABLE
      
      This patch fixes Trac #1287.  
      
      The problem is described in Note [Unused spec binders] in DsBinds.
      
      At the same time I realised that the error messages in DsBinds.dsPrag
      were being given the location of the *binding* not the *pragma*.
      So I've fixed that too.
      e5ca7e6e
    • simonpj@microsoft.com's avatar
      Warning police · 7edaba26
      simonpj@microsoft.com authored
      7edaba26
  4. 20 Apr, 2007 1 commit
  5. 10 Apr, 2007 1 commit
  6. 17 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Re-working of the breakpoint support · cdce6477
      Simon Marlow authored
      This is the result of Bernie Pope's internship work at MSR Cambridge,
      with some subsequent improvements by me.  The main plan was to
      
       (a) Reduce the overhead for breakpoints, so we could enable 
           the feature by default without incurrent a significant penalty
       (b) Scatter more breakpoint sites throughout the code
      
      Currently we can set a breakpoint on almost any subexpression, and the
      overhead is around 1.5x slower than normal GHCi.  I hope to be able to
      get this down further and/or allow breakpoints to be turned off.
      
      This patch also fixes up :print following the recent changes to
      constructor info tables.  (most of the :print tests now pass)
      
      We now support single-stepping, which just enables all breakpoints.
      
        :step <expr>     executes <expr> with single-stepping turned on
        :step            single-steps from the current breakpoint
      
      The mechanism is quite different to the previous implementation.  We
      share code with the HPC (haskell program coverage) implementation now.
      The coverage pass annotates source code with "tick" locations which
      are tracked by the coverage tool.  In GHCi, each "tick" becomes a
      potential breakpoint location.
      
      Previously breakpoints were compiled into code that magically invoked
      a nested instance of GHCi.  Now, a breakpoint causes the current
      thread to block and control is returned to GHCi.
      
      See the wiki page for more details and the current ToDo list:
      
        http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
      cdce6477
  7. 11 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Rationalise GhcMode, HscTarget and GhcLink · 3c22606b
      Simon Marlow authored
      This patch cleans up the GHC API, and adds some functionality: we can
      now compile to object code inside GHCi.
      
      Previously we had:
      
        data GhcMode
          = BatchCompile
          | Interactive
          | OneShot
          | JustTypecheck
          | MkDepend
        
        data HscTarget
          = HscC
          | HscAsm
          | HscJava
          | HscInterpreted
          | HscNothing
      
      There was redundancy here; if GhcMode is Interactive, then only
      HscInterpreted makes sense, and JustTypecheck required HscNothing.
      Now we have:
      
        data GhcMode
          = CompManager       -- ^ --make, GHCi, etc.
          | OneShot           -- ^ ghc -c Foo.hs
          | MkDepend          -- ^ ghc -M, see Finder for why we need this
      
      and HscTarget remains as before.
      
      Previously GhcLink looked like this:
      
        data GhcLink = NoLink | StaticLink
      
      Now we have:
      
        data GhcLink = NoLink | LinkBinary | LinkInMemory
      
      The idea being that you can have an HscTarget of HscAsm (for example)
      and still link in memory.
      
      There are two new flags:
      
        -fobject-code selects object code as the target (selects
                      either -fasm or -fvia-C, whichever is the default)
                      This can be usd with ':set' in GHCi, or on the command line.
      
        -fbyte-code   sets byte-code as the target.  Only works in GHCi.
                      One day maybe this could save the byte code in a file
                      when used outside GHCi.
      
        (names chosen for consistency with -fno-code).
      
      Changes to the GHC API: newSession no longer takes the GhcMode
      argument.  The GhcMode defaults to CompManager, which is usually what
      you want.  To do JustTypecheck now, just set hscTarget to HscNothing.
      3c22606b
  8. 22 Mar, 2007 1 commit
  9. 21 Mar, 2007 4 commits
  10. 20 Mar, 2007 1 commit
  11. 19 Mar, 2007 1 commit
  12. 16 Mar, 2007 2 commits
  13. 15 Mar, 2007 1 commit
    • simonpj@microsoft.com's avatar
      Make the type-defaulting in GHCi use () as the first default type · d4b95ea9
      simonpj@microsoft.com authored
      See Trac #1200
      
      This is a somewhat experimental fix.  I'm not sure we want it in 6.6.1
      
      The idea is explained in Note [Default unitTy] in TcSimplify.  In
      interative mode (or with -fextended-default-rules) we add () as the
      first type we try when defaulting.  This has very little real impact,
      except in the following case.  Consider:
      	Text.Printf.printf "hello"
      This has type (forall a. IO a); it prints "hello", and returns
      'undefined'.  We don't want the GHCi repl loop to try to print that
      'undefined'.  The neatest thing is to default the 'a' to (), rather
      than to Integer (which is what would otherwise happen; and then GHCi
      doesn't attempt to print the ().  So in interactive mode, we add () to
      the list of defaulting types.  
      
      d4b95ea9
  14. 14 Mar, 2007 3 commits
  15. 06 Mar, 2007 1 commit
  16. 28 Feb, 2007 1 commit
  17. 23 Feb, 2007 2 commits
  18. 19 Feb, 2007 1 commit
    • mnislaih's avatar
      Removed unnecessary code · 704422eb
      mnislaih authored
      The breakpointJump functions never show up in the code that the typechecker sees, as they are inserted by the desugarer later.
      704422eb
  19. 21 Feb, 2007 3 commits
  20. 19 Feb, 2007 1 commit
  21. 07 Feb, 2007 1 commit
  22. 06 Feb, 2007 1 commit
  23. 04 Feb, 2007 3 commits
  24. 02 Feb, 2007 1 commit
  25. 31 Jan, 2007 1 commit
  26. 21 Dec, 2006 1 commit
    • lennart@augustsson.net's avatar
      Add support for overloaded string literals. · 90dc9026
      lennart@augustsson.net authored
      The class is named IsString with the single method fromString.
      Overloaded strings work the same way as overloaded numeric literals.
      In expressions a string literals gets a fromString applied to it.
      In a pattern there will be an equality comparison with the fromString:ed literal.
      
      Use -foverloaded-strings to enable this extension.
       
      90dc9026