unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* modules, 2nd try.
@ 2002-09-17 22:18 Han-Wen Nienhuys
  2002-09-18 18:56 ` Thien-Thi Nguyen
  2002-09-19 21:14 ` Neil Jerram
  0 siblings, 2 replies; 8+ messages in thread
From: Han-Wen Nienhuys @ 2002-09-17 22:18 UTC (permalink / raw)



After getting no response on the devel list, let me try once more,
over here. I want to move the input -identifier mechanism in LilyPond
over to Scheme. Currently, people can do


	%identifier = ... defines a variable 
	variableOne = 5.0
	\score {

	       ..music..

	       \paper  {
		       % The paper block introduces a new scope.

		       variableTwo = 5.0\cm

		       % \identifier references a variable.
		       linewidth = \variableOne * \variableTwo
	       }
	}
       % variableTwo not visible here.
	

I want to move this to Scheme to get more flexibility, without having
to bother with programming language design: identifiers should become
Scheme variables, and should be available in Scheme functions. In the
future, it should be possible to do

	%identifier = ... defines a variable
	variableOne = 5.0

	\score {

	       ..music..

	       \paper  {
		       variableTwo = 5.0\cm

		       %  #... introduces inline Scheme. 
		       linewidth = #(* variableOne variableTwo)
	       }
	}

In terms of code, I want to create sets of bindings. The sets should
be nested, and available to the Scheme evaluator.

How do I do this?  I tried mucking about with modules, but I can't
even get the basic functionality working, and they seem a bad match
with my wishes, since definitions in modules are private by default,
and the name spaces are not nested.

How do I go about this?

--
Han-Wen Nienhuys   |   hanwen@cs.uu.nl   |   http://www.cs.uu.nl/~hanwen 


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-21 11:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-17 22:18 modules, 2nd try Han-Wen Nienhuys
2002-09-18 18:56 ` Thien-Thi Nguyen
2002-09-18 19:19   ` Han-Wen Nienhuys
2002-09-19 21:14 ` Neil Jerram
2002-09-20  9:25   ` Han-Wen Nienhuys
2002-09-20 18:42     ` Neil Jerram
2002-09-21 11:15       ` Han-Wen Nienhuys
2002-09-21 11:22         ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).