[Top][All Lists]

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

Re: [Geiser-users] Re-evaluation fails when embedding Geiser into Racket

From: Jose A. Ortega Ruiz
Subject: Re: [Geiser-users] Re-evaluation fails when embedding Geiser into Racket program
Date: Mon, 13 May 2013 21:05:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi Mikhail,

On Mon, May 13 2013, Mikhail Maluyk wrote:

> Hello,
> I'm seeing strange behaviour when re-evaluating code, here is a
> simplified version that fails for me:
> ;; hello.rkt
> (module hello racket
>   (require geiser/server "world.rkt")
>   (start-geiser 9999 "localhost"))  

Sorry if i'm being dense, but what's exactly the purpose of this module?
How are you running Geiser? (this is not one of the ways of doing it :))

If you want to use a racket process running outside emacs, see
bin/ for an example of how to start it (and then you
need to use M-x connect-to-racket).

> ;; world.rkt
> (module world racket
>   (provide pi)
>   (define pi 3.14))
> When i edit source code of world.rkt and change pi to be 3.141 and
> execute geiser-eval-last-sexp i get the following error:
> (define pi 3.141)
> Error: struct:exn:fail:contract:variable
> define-values: assignment disallowed;
>  cannot re-define a constant
>   constant: pi
>   in module: "/home/d/test/world.rkt"

My guess is that you're not connected to a properly intialized geiser
process, or loading world.rkt before geiser, so that the latter does not
have time to setup things properly before world.rkt is compiled by the
Racket process.

The easiest way is to first invoke 'M-x run-racket' within Emacs (or
connect-to-racket if using a external racket server).

In this world, there are only two tragedies.  One is not getting
what one wants, and the other is getting it. - Oscar Wilde

reply via email to

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