[racket] else: not allowed as an expression in: else

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Tue Dec 21 19:36:58 EST 2010

On 12/21/2010 05:29 PM, Danny Yoo wrote:
> On Tue, Dec 21, 2010 at 3:57 PM, Niitsuma Hirotaka
> <hirotaka.niitsuma at gmail.com> wrote:
>> I try to run this code on racket
>>
>> http://www.daniweb.com/forums/thread277930.html
>>
>> After little modify I enables run this code on swindle.
>> But when I chose language racket, this code cause error
>>
>> else: not allowed as an expression in: else
> The eopl/eopl module is providing its own version of the conditional
> form 'cond'.  The error you're seeing is because it is not cooperating
> with racket's else.
>
> One way to resolve this is to only use the eopl bindings for
> define-datatype and cases, which you can do like this:
>
>
> ;; Comment out the original require to eopl/eopl
> ;;
> ;; (require eopl/eopl)
> ;;
> ;; and replace it with this:
> ;;
> (require (only-in eopl/eopl
>                   define-datatype
>                   cases
>                   eopl:error))
>
>
>
>
> However: is there a reason why the whole module isn't just written in
> #lang eopl?

Just using #lang eopl will result in this error (at least)

k.rkt:39:10: compile: unbound identifier in module in: andmap


Posted on the users mailing list.