1. 28 Dec, 2006 1 commit
  2. 22 Dec, 2006 5 commits
  3. 21 Dec, 2006 1 commit
  4. 20 Dec, 2006 1 commit
  5. 21 Dec, 2006 1 commit
  6. 20 Dec, 2006 1 commit
  7. 19 Dec, 2006 3 commits
  8. 18 Dec, 2006 4 commits
    • chak@cse.unsw.edu.au.'s avatar
      Deriving for indexed data types · 380512de
      chak@cse.unsw.edu.au. authored
      - This patch implements deriving clauses for data instance declarations
        (toplevel and associated)
      - Doesn't support standalone deriving.  This could be easily supported,
        but requires an extension of the syntax of standalone deriving clauses.
        Björn, fancy adding this?
      - We cannot derive Typeable.  This seems a problem of notation, more than 
        anything else.  Why?  For a binary vanilla data type "T a b", we would 
        generate an instance Typeable2 T; ie, the instance is for the constructor
        alone.  In the case of a family instance, such as (S [a] (Maybe b)), we
        simply have no means to denote the associated constuctor.  It appears to
        require type level lambda - something like (/\a b. S [a] (Maybe b).
      - Derivings are for *individual* family *instances*, not for entire families.
        Currently, I know of no simple translation of class instances for entire 
        families to System F_C.  This actually seems to be similar to implementing
        open data types à la Löh & Hinze.
      - This patch only covers data types, not newtypes.
      380512de
    • Ian Lynagh's avatar
      5f8b35ad
    • mnislaih's avatar
      f3109bb1
    • mnislaih's avatar
  9. 17 Dec, 2006 1 commit
  10. 16 Dec, 2006 3 commits
  11. 11 Dec, 2006 3 commits
  12. 10 Dec, 2006 13 commits
    • mnislaih's avatar
      Closure inspection in GHCi · 121da25a
      mnislaih authored
      The :print, :sprint and :force commands for GHCi.
      This set of commands allows inspection of heap structures of the bindings in the interactive environment.
      This is useful to observe lazyness and specially to inspect things with undespecified polymorphic types, as happens often in breakpoints.
      121da25a
    • mnislaih's avatar
      Dynamic breakpoints in GHCi · 8bc615fd
      mnislaih authored
      This patch adds dynamic breakpoints to GHCi
      
      
      There is a new ':breakpoint' command to manage breakpoints.
      GHCi simply uses the breakpoint api functions in ghc-api to install itself as a client.
      The mechanism used by GHCi to keep track of enabled breakpoints is a simple table.
      
      When a breakpoint is hit, a new interactive session is launched and the bindings in the breakpoint are injected. Some commands are disabled in this sub session
      8bc615fd
    • mnislaih's avatar
      Split the GHCi monad apart from InteractiveUI, together with some related functions · 8099fc7e
      mnislaih authored
      I found this convenient while I was extending ghci with the debugger. I wanted to put all the debugger stuff in a separate module, but I would need a huge hs-boot file to break the circular dependencies. This option seemed better
      8099fc7e
    • mnislaih's avatar
      f9a0b197
    • mnislaih's avatar
      065a02b5
    • mnislaih's avatar
      Capturing and keeping track of local bindins in the desugarer · eca538c8
      mnislaih authored
      Used in the desugaring of the breakpoint primitive
      eca538c8
    • mnislaih's avatar
      Handle breakpoint jumps while splicing TH functions in ghci · 1df34b32
      mnislaih authored
      The dynamic linker has been modified so that it won't panic if one of the breakpointJump functions fails to resolve.
      Now, if the dynamic linker fails to find a HValue for a Name, before looking for a static symbol it will ask to
      
      Breakpoints.lookupBogusBreakpointVal :: Name -> Maybe HValue
      
      which returns an identity function for the Jump names or Nothing else.
      
      A TH function might contain a call to a breakpoint function. So if it is compiled to bytecodes, the breakpoints will be desugared to 'jumps'. Whenever this code is spliced, the linker will fail to find the jumpfunctions unless there is a default.
      1df34b32
    • mnislaih's avatar
      Breakpoint code instrumentation · 37610105
      mnislaih authored
      Instrumentation gets activated by the '-fdebugging' dynflag.
      
      All the instrumentation occurrs in the desugarer; it consists of inserting 'breakpoint' combinators at a number of places in the AST, namely: 
       - Binding sites
       - Do-notation statements 
      These 'breakpoint' combinators will later be further desugared (at DsExpr) into ___Jump functions.
      For more info about this and all the ghci.debugger see the page at the GHC wiki:
      
      http://hackage.haskell.org/trac/ghc/wiki/GhciDebugger
      37610105
    • mnislaih's avatar
      The breakpoint primitive · 3a99fa88
      mnislaih authored
      3a99fa88
    • mnislaih's avatar
      GHCi debugger documentation · 3e4ee05c
      mnislaih authored
      3e4ee05c
    • mnislaih's avatar
      Extend the GHC API with breakpoints and breakpoint handlers · ead42435
      mnislaih authored
      The entry point is:
      setBreakpointHandler :: Session -> BkptHandler Module -> IO ()
      
      ead42435
    • mnislaih's avatar
      Playing with closures · 2c92736e
      mnislaih authored
      RtClosureInspect includes a bunch of stuff for playing with closures:
      
      - the datatype Closure is the low level representation type
      - the datatype Term is the high level representation type
      - cvObtainTerm is the main entry point, providing the Term representation of an arbitrary closure
      2c92736e
    • mnislaih's avatar
      Retrieving the datacon of an arbitrary closure · ab5b8aa3
      mnislaih authored
      This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime:
      - The RTS linker now carries a hashtable 'Address->Symbol' for data constructors
      - The Persistent Linker State in the dynamic linker is extended in a similar way.
      
      Finally, these two sources of information are consulted by:
      
      > Linker.recoverDataCon :: a -> TcM Name
      ab5b8aa3
  13. 09 Dec, 2006 1 commit
  14. 15 Dec, 2006 2 commits