From: Nala Ginrut <nalaginrut@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: Andy Wingo <wingo@pobox.com>, guile-devel@gnu.org
Subject: Re: [FEATURE] List all available languages
Date: Sat, 26 Jan 2013 09:44:15 +0800 [thread overview]
Message-ID: <1359164655.3676.52.camel@Renee-desktop.suse> (raw)
In-Reply-To: <87a9rwnagt.fsf@tines.lan>
On Fri, 2013-01-25 at 17:50 -0500, Mark H Weaver wrote:
> I wrote:
> > How about adding a new boolean field to <language> that marks it as
> > "internal" or something to that effect? We could have it default to #f
> > for backward compatibility, and mark our internal languages as #t.
>
> I've attached a proposed patch to add this field. Thoughts?
>
> Mark
>
OK, I see.
How about printing like this:
-------------"guild compile --list-languages"------------------
Front-end | Inner Language
scheme
ecmascript
elisp => tree-il => glil => assembly => bytecode => value
lua
ruby
...
--------------------------end----------------------------------
It's no need to print like this in 'guile --list-languages'.
Thanks!
>
> differences between files attachment
> (0001-Add-internal-only-flag-to-language-specifications.patch),
> "[PATCH] Add 'internal-only?' flag to <language> specifications"
> From 605cbde174afa52d4ccfd8528ef6903ad98a8002 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <mhw@netris.org>
> Date: Fri, 25 Jan 2013 17:44:14 -0500
> Subject: [PATCH] Add 'internal-only?' flag to <language> specifications.
>
> * module/system/base/language.scm (<language>): Add 'internal-only?'
> field, and export new 'language-internal-only?' predicate.
>
> * doc/ref/compiler.texi (Compiler Tower): Document.
>
> * module/language/assembly/spec.scm, module/language/bytecode/spec.scm,
> module/language/glil/spec.scm, module/language/objcode/spec.scm,
> module/language/tree-il/spec.scm, module/language/value/spec.scm:
> Mark these languages as 'internal-only?'.
> ---
> doc/ref/compiler.texi | 3 ++-
> module/language/assembly/spec.scm | 1 +
> module/language/bytecode/spec.scm | 1 +
> module/language/glil/spec.scm | 4 +++-
> module/language/objcode/spec.scm | 1 +
> module/language/tree-il/spec.scm | 1 +
> module/language/value/spec.scm | 1 +
> module/system/base/language.scm | 4 +++-
> 8 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/doc/ref/compiler.texi b/doc/ref/compiler.texi
> index a88942d..46cde8c 100644
> --- a/doc/ref/compiler.texi
> +++ b/doc/ref/compiler.texi
> @@ -55,7 +55,8 @@ They are registered with the @code{define-language} form.
> @deffn {Scheme Syntax} define-language @
> name title reader printer @
> [parser=#f] [compilers='()] [decompilers='()] [evaluator=#f] @
> -[joiner=#f] [make-default-environment=make-fresh-user-module]
> +[joiner=#f] [internal-only?=#f] @
> +[make-default-environment=make-fresh-user-module]
> Define a language.
>
> This syntax defines a @code{#<language>} object, bound to @var{name}
> diff --git a/module/language/assembly/spec.scm b/module/language/assembly/spec.scm
> index 01a55c4..a5efcb7 100644
> --- a/module/language/assembly/spec.scm
> +++ b/module/language/assembly/spec.scm
> @@ -31,4 +31,5 @@
> #:parser read ;; fixme: make a verifier?
> #:compilers `((bytecode . ,compile-bytecode))
> #:decompilers `((bytecode . ,decompile-bytecode))
> + #:internal-only? #t
> )
> diff --git a/module/language/bytecode/spec.scm b/module/language/bytecode/spec.scm
> index 57ccd71..af2f9c7 100644
> --- a/module/language/bytecode/spec.scm
> +++ b/module/language/bytecode/spec.scm
> @@ -35,4 +35,5 @@
> #:printer write
> #:compilers `((objcode . ,compile-objcode))
> #:decompilers `((objcode . ,decompile-objcode))
> + #:internal-only? #t
> )
> diff --git a/module/language/glil/spec.scm b/module/language/glil/spec.scm
> index a8164e5..3faa9b9 100644
> --- a/module/language/glil/spec.scm
> +++ b/module/language/glil/spec.scm
> @@ -37,4 +37,6 @@
> #:printer write-glil
> #:parser parse-glil
> #:compilers `((assembly . ,compile-asm))
> - #:decompilers `((assembly . ,decompile-assembly)))
> + #:decompilers `((assembly . ,decompile-assembly))
> + #:internal-only? #t
> + )
> diff --git a/module/language/objcode/spec.scm b/module/language/objcode/spec.scm
> index 7cc85b7..a17166a 100644
> --- a/module/language/objcode/spec.scm
> +++ b/module/language/objcode/spec.scm
> @@ -79,4 +79,5 @@
> #:printer write-objcode
> #:compilers `((value . ,objcode->value))
> #:decompilers `((value . ,decompile-value))
> + #:internal-only? #t
> )
> diff --git a/module/language/tree-il/spec.scm b/module/language/tree-il/spec.scm
> index 38e6d31..eae93b6 100644
> --- a/module/language/tree-il/spec.scm
> +++ b/module/language/tree-il/spec.scm
> @@ -42,4 +42,5 @@
> #:parser parse-tree-il
> #:joiner join
> #:compilers `((glil . ,compile-glil))
> + #:internal-only? #t
> )
> diff --git a/module/language/value/spec.scm b/module/language/value/spec.scm
> index 6c6cff9..26823ca 100644
> --- a/module/language/value/spec.scm
> +++ b/module/language/value/spec.scm
> @@ -26,4 +26,5 @@
> #:title "Values"
> #:reader #f
> #:printer write
> + #:internal-only? #t
> )
> diff --git a/module/system/base/language.scm b/module/system/base/language.scm
> index 81b43b7..8949c05 100644
> --- a/module/system/base/language.scm
> +++ b/module/system/base/language.scm
> @@ -25,7 +25,8 @@
> language-name language-title language-reader
> language-printer language-parser
> language-compilers language-decompilers language-evaluator
> - language-joiner language-make-default-environment
> + language-joiner language-internal-only?
> + language-make-default-environment
>
> lookup-compilation-order lookup-decompilation-order
> invalidate-compilation-cache! default-environment
> @@ -49,6 +50,7 @@
> (decompilers '())
> (evaluator #f)
> (joiner #f)
> + (internal-only? #f)
> (make-default-environment make-fresh-user-module))
>
> (define-macro (define-language name . spec)
next prev parent reply other threads:[~2013-01-26 1:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 11:28 [FEATURE] List all available languages Nala Ginrut
2013-01-25 9:56 ` Nala Ginrut
2013-01-25 10:43 ` Nala Ginrut
2013-01-25 11:06 ` Andy Wingo
2013-01-25 16:46 ` Nala Ginrut
2013-01-31 10:32 ` Andy Wingo
2013-02-01 2:34 ` Nala Ginrut
2013-01-25 20:06 ` Mark H Weaver
2013-01-25 22:50 ` Mark H Weaver
2013-01-26 1:44 ` Nala Ginrut [this message]
2013-01-27 10:21 ` Andy Wingo
2013-01-27 15:31 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359164655.3676.52.camel@Renee-desktop.suse \
--to=nalaginrut@gmail.com \
--cc=guile-devel@gnu.org \
--cc=mhw@netris.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).