Mon Apr 20 07:25:25 PDT 2009  Simon Marlow <[email protected]>
  * FIX #2845: Allow breakpoints on expressions with unlifted type
  Ignore-this: 8d1b2624a4635b421032463219af604e
  
  It turns out we can easily support breakpoints on expressions with
  unlifted types, by translating 
  
    case tick# of _ -> e
  
  into
  
    let f = \s . case tick# of _ -> e 
    in  f realWorld#
  
  instead of just a plain let-binding.  This is the same trick that GHC
  uses for abstracting join points of unlifted type.
  
  In #2845, GHC has eta-expanded the tick expression, changing the
  result type from IO a to (# State#, a #), which was the reason the
  tick was suddenly being ignored.  By supporting ticks on unlifted
  expressions we can make it work again, although some confusion might
  arise because _result will no longer be available (it now has
  unboxed-tuple type, so we can't bind it in the environment).  The
  underlying problem here is that GHC does transformations like
  eta-expanding the tick expressions, and there's nothing we can do to
  prevent that.

    M ./compiler/ghci/ByteCodeGen.lhs -2 +15
    M ./compiler/main/InteractiveEval.hs -5 +9

View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20090420142525-12142-b7d5bd4930f5f992de05141f55fa5462adb664b6.gz

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to