guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doctest for guile


From: Andy Wingo
Subject: Re: Doctest for guile
Date: Tue, 17 Sep 2013 19:53:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

On Wed 11 Sep 2013 17:03, Dmitry Bogatov <address@hidden> writes:

> $ guile doctest.scm '(foo)'

Neat!

> + Your ideas?
>
> I it will be found useful enough, I will gladly work on patch to integrate
> doctest in Guile guild script.

I was going to write exactly this!  "guild doctest '(foo)'" sounds
sensible to me.

Note also that the compiler will residualize other properties in
addition to docstrings.  They are taken from pairs in a static vector in
head position.  Hacky, right?

    scheme@(guile-user)> (define (foo) #((foo . bar) (baz . qux)) 1)
    scheme@(guile-user)> (procedure-properties foo)
    $3 = ((arity 0 0 #f) (name . foo) (foo . bar) (baz . qux))

They don't propagate to the interpreter but that can be fixed.  Anyway
it's possible to associate some kind of test property with test.  If
that's useful to you, anyway.

Cheers,

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]