From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: define-language Date: Fri, 7 Aug 2020 15:34:30 -0700 Message-ID: <8a6f0667-38ad-ba3c-f344-2f8b73113ff1@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34694"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat Aug 08 00:34:51 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4Awr-0008tV-WE for guile-user@m.gmane-mx.org; Sat, 08 Aug 2020 00:34:50 +0200 Original-Received: from localhost ([::1]:46206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4Awr-00035c-1q for guile-user@m.gmane-mx.org; Fri, 07 Aug 2020 18:34:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4Awe-00035K-It for guile-user@gnu.org; Fri, 07 Aug 2020 18:34:37 -0400 Original-Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:37718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4Awc-0000cI-IE for guile-user@gnu.org; Fri, 07 Aug 2020 18:34:36 -0400 Original-Received: by mail-pf1-x436.google.com with SMTP id s26so1867006pfm.4 for ; Fri, 07 Aug 2020 15:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=EDVlXGJEOkrMGrcC90sb4ibtcaHVx37Mclp0TZqXenI=; b=eOcTdFHKPFLhqhs4W9Zrq2xo/TNM1RH87+UXaXq1pMONh5eHWbMxAWWMOki2Tzux++ nSDkoa/asYcF8ZjQBp7AFaDZKGCPGy00/cir/QuVUuLhrnfG9pcFyaTtNcZy4srWihlr JzZKLBtlzn1nxS45Pau0rBx0VCAhq5TWVWGKBRmcDAHmLvb5uqc9Ng0TitWa0ceUqcp/ i77Kd4CxSpOtZj8e/uIuoDyagnSopN5IACCGcmEzH4F9gUso7vaj92uJtZbDOkk0A3o6 JT+bdGMz5X3p1JBiOz2l6Vqcg/KUshRpfmTSgkg+XewZxbOcaIKNqhkI587xAh82uQU1 Y5GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=EDVlXGJEOkrMGrcC90sb4ibtcaHVx37Mclp0TZqXenI=; b=DBUvCPWAypMXvaUw/7wKgAziMdH0Cj0XHWLVbszfzja9uTFxtJ0YsKXSUfVQJZnykb N+98kSBnKM1xT4FEPNS00g0BLSHoehvjweRiiG6C87oiMq3RRch8Rx4uTIeMKp3APupT 8jDD4JlWTiYBnLRoHB8MmcQE0C5NtkvM+CtK+WuTXaQx+QKSWb5NKs7mLLIsUgi+5GY0 iZ3NiMhm12WPGA/ENWrtekWzUMG/+C+rSi+zEC+DnNez/EJfvrSVcav2UNwn2dGH278w AcDpxd9XvSK3Im8s7jazYjpy1FXIKiHkIv9Z3d/gCWUW6sqmfZNMVrNzyyT8Gp/THxBg GWlg== X-Gm-Message-State: AOAM533rOqXjOi3Iemk6tr8hE3BLLrHu3FFlAW0hwDVOn9R5joFpPYUL rR8RyR1HDBpqasLfm+uBW4pDCD1B X-Google-Smtp-Source: ABdhPJxyJhRZft0B7+ivEkxqttG4CE5yH8nsSIK0QB7UgMqponRvNAuCxJTHLUS713vO7uSM8OJfeg== X-Received: by 2002:a65:4786:: with SMTP id e6mr13179367pgs.258.1596839672192; Fri, 07 Aug 2020 15:34:32 -0700 (PDT) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id e9sm13982119pfh.151.2020.08.07.15.34.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Aug 2020 15:34:31 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=matt.wette@gmail.com; helo=mail-pf1-x436.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16792 Archived-At: On 8/7/20 12:31 PM, Stephen Scheck wrote: > What is the right way to use `define-language`? The Guile manual says that > when using this form "the language will be added to the global language > set." I interpret that to mean that the `,language` meta-command switches > the REPL to use the newly-defined language, but it doesn't work: > > scheme@(guile-user)> (use-modules (system base language)) > scheme@(guile-user)> (define-language mylingua > #:title "Mylingua" > #:reader (lambda (port env) ...) > #:evaluator (lambda (x module) ...) > #:printer write) > scheme@(guile-user)> mylingua > $1 = #< name: mylingua title: "Mylingua" reader: # 1bfcd38 at :5:11 (port env)> printer: # #:optional _)> parser: #f compilers: () decompilers: () evaluator: > #:6:14 (x module)> joiner: #f > for-humans?: #t make-default-environment: # make-fresh-user-module ()> lowerer: #f analyzer: #f compiler-chooser: #f> > scheme@(guile-user)> ,language mylingua > While executing meta-command: > no such language mylingua Also, I believe you need to have the language defined in a module (i.e., define-module) with path (language mylingua spec) in file spec.scm in a subdirectory language/mylingua.