Changes between Version 47 and Version 48 of ExplicitCallStack


Ignore:
Timestamp:
Jan 30, 2007 5:03:14 PM (7 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExplicitCallStack

    v47 v48  
    170170}}} 
    171171 
    172 So hat-stack's considers the context in which a function is saturated to be the place where it is called. 
     172So hat-stack's considers the context in which a function is saturated to be the place where it is called. To make this even more apparent we can eta-expand `e`: 
     173{{{ 
     174   e :: [Int] -> Int 
     175   e x = f 10 x 
     176}}} 
     177Now we get this stack trace: 
     178{{{ 
     179   Program terminated with error: 
     180           hd: empty list 
     181   Virtual stack trace: 
     182   (unknown)       {?} 
     183   (J.hs:17)       error "hd: empty..." 
     184   (J.hs:16)       hd [] | case [] 
     185   (J.hs:9)        hd [] 
     186   (J.hs:6)        e [] 
     187   (unknown)       d 
     188}}} 
     189Which is: 
     190{{{ 
     191   d -> e -> hd 
     192}}} 
     193This is because `hd` now becomes saturated in the body of `e`. 
    173194 
    174195== Transformation rules ==