[Larceny-users] debugging question

Ray Racine ray.racine at gmail.com
Sat Nov 8 17:52:31 EST 2008


You can lift into ERR5RS any R5RS procdure via

> (import (primitive <some procedure>))

So (import (primitive trace)) gets what you want.  See below.

Larceny v0.97b1 (beta test) (Nov  8 2008 10:28:10, precise:Linux:unified)
larceny.heap, built on Sat Nov  8 10:32:37 EST 2008
ERR5RS mode (no libraries have been imported)

> Autoloading (rnrs)
Autoloading (rnrs enums)
Autoloading (rnrs lists)
Autoloading (rnrs syntax-case)
Autoloading (rnrs conditions)
Autoloading (err5rs records procedural)
Autoloading (rnrs exceptions)
Autoloading (rnrs hashtables)
Autoloading (rnrs arithmetic bitwise)
Autoloading (rnrs programs)
Autoloading (rnrs files)
Autoloading (rnrs io ports)
Autoloading (larceny deprecated)
Autoloading (rnrs records syntactic)
Autoloading (rnrs records procedural)
Autoloading (rnrs control)
Autoloading (rnrs sorting)
Autoloading (rnrs bytevectors)
Autoloading (rnrs unicode)

> (import (rnrs))

> (import (primitives trace))

> (define tozero
    (lambda (n)
      (if (zero? n)
      'done
      (tozero (- n 1)))))

> (trace tozero)
#<PROCEDURE tozero>

> (tozero 10)
(tozero 10)
Enter tozero(10)
 Enter tozero(9)
  Enter tozero(8)
   Enter tozero(7)
    Enter tozero(6)
     Enter tozero(5)
      Enter tozero(4)
       Enter tozero(3)
        Enter tozero(2)
         Enter tozero(1)
          Enter tozero(0)
          Leave tozero(0) => done
         Leave tozero(1) => done
        Leave tozero(2) => done
       Leave tozero(3) => done
      Leave tozero(4) => done
     Leave tozero(5) => done
    Leave tozero(6) => done
   Leave tozero(7) => done
  Leave tozero(8) => done
 Leave tozero(9) => done
Leave tozero(10) => done
done


On Sat, Nov 8, 2008 at 2:52 PM, Harsh Raju Chamarthi <harshrc at gmail.com>wrote:

> Hi,
> What library should I import to use (trace procedure) debugger
> functionality?
> I am running larceny in the err5rs mode.
>
> thanks in advance.
> cheers.
> /harsh
>
> --
> Man is most nearly himself when he achieves the seriousness of a child at
> play.
> -  Heraclitus
>
> _______________________________________________
> Larceny-users mailing list
> Larceny-users at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/larceny-users
>
>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Larceny-users mailing list