[plt-scheme] question from a newbie regarding the import of a library

From: Jon Loldrup (loldrup at gmail.com)
Date: Sat Apr 4 19:55:08 EDT 2009

Hi Ryan and thank you for the clarification!
Now I just tried this: I made a new drscheme-file, choose the language
"Module", saved it, and pasted the following into it:

#lang scheme
(require (planet dfriedman/miniKanren:1:1/minikanren))
(run #f (q) fail)

the first two lines succeeded, but the third failed with this error:

expand: unbound identifier in module in: fail

the third line was taken from the file
mktests.scm<http://kanren.cvs.sourceforge.net/viewvc/kanren/kanren/mini/mktests.scm?revision=1.6&view=markup>which
I think is designed to test a minikanren implementation. Therefor I
think that that third line is valid minikanren-syntax and should run without
errors.


Jon Loldrup
using DrScheme 4.1.5


2009/4/4 Ryan Culpepper <ryanc at ccs.neu.edu>

> PLaneT is designed so you don't have to download files and fiddle with
> names and paths yourself. DrScheme will download the files, put them in the
> right place, compile them, install their documentation, etc automatically.
>
> 1 Open a fresh DrScheme window (make sure the language is Module or Pretty
> Big)
> 2 Go to the Interactions area (the bottom part of the editor, with the
> prompt)
> 3 Execute that require line:
>    (require (planet dfriedman/miniKanren:1:1/minikanren))
>
> That's it! You now have minikanren installed (DrScheme shows a message
> saying so at the bottom of the window), and you can use it immediately in
> the interactions area. To develop a program with minikanren, copy the
> require line up to the definitions area (the top part).
>
> Take a look at the Quick Introduction to PLT Scheme with Pictures,
> especially the part about modules:
>
>  http://docs.plt-scheme.org/quick/index.html#(part._.Modules)<http://docs.plt-scheme.org/quick/index.html#%28part._.Modules%29>
>
> And then perhapse browse the Guide for more information:
>
>  http://docs.plt-scheme.org/guide/index.html
>
> You have local copies of this documentation and more: select the "Help"
> menu and click "Help Desk".
>
> Hope that helps!
> Ryan
>
>
> Jon Loldrup wrote:
>
>> Hi
>>
>> I'm trying to import
>> the<
>> http://planet.plt-scheme.org/display.ss?package=miniKanren.plt&owner=dfriedman
>> >minikanren
>> library to my PLT-Scheme 4.1.5. Does a relatively simple method
>> exist for getting to know how to import libraries into DrScheme? Will I
>> have
>> to read all this http://docs.plt-scheme.org/reference/require.html  to be
>> able to do it? The file I'm trying to load is the minikanren.ss - I
>> created
>> the file by copying the source code from the link into a new text-file,
>> naming it minikanren.ss<
>> http://planet.plt-scheme.org/display.ss?package=miniKanren.plt&owner=dfriedman
>> >and
>> placing it on my harddrive.
>>
>> I just need a document describing where to put the minikanren.ss file and
>> how to write the path to this file in the include-sentence.
>> The minikanren site<
>> http://planet.plt-scheme.org/display.ss?package=miniKanren.plt&owner=dfriedman
>> >says
>> this:
>>
>> "To load: *(require (planet dfriedman/miniKanren:1:1/minikanren))"
>> *
>> Which doesn't tell me how to load it as it seems it has to be modified
>> before it will work. I've tried it as-is with no luck, while placing the
>> minikanren.ss in C:\Program Files\PLT\collects\minikanren. I also tried
>> theese require sentences:
>> *(require (planet ~/minikanren/minikanren.ss:1:1/minikanren))
>> (require (planet C:\Program
>> Files\PLT\collects\minikanren.ss:1:1/minikanren))
>> *and some others, with no luck either.
>>
>>
>> I also tried simply opening the minikanren.ss file in DrScheme, choosing
>> the
>> language "Pretty Big". It runs fine, but then I can't run simple test
>> cases
>> like:
>>
>> (run #f (q) fail)
>>
>> which results in: ". . reference to undefined identifier: run"
>>
>>
>> What does a Schemer do?
>>
>> kind regards Jon Loldrup
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090405/cecaa502/attachment.html>

Posted on the users mailing list.