[racket] Question on error message

From: Alvin Schatte (AlvinSchatte at skytex.net)
Date: Fri Sep 6 09:22:39 EDT 2013

Hello Carl,

I found a location in mras.rkt where I comment out the provide for the map-2 function, the program runs, and when I re-instate it, it fails.  The section of code is:

;;  map-2
(provide
(proc-doc/names map-2 
                 (procedure? list? list? . -> . list?)
                 (proc l1 l2)
                 @{Applies a procedure of two elements to the elements of two lists, 
                   @racket[l1] and @racket[l2], returning the result in another list.  
                   When one list is exhausted, the other list is returned as the rest of the resultant list.}))

Also, when the proc-doc/names section is replaced by the function name, i.e., (provide map-2), the program runs.

I was removing provide contracts one by one to see if I could find the problem.  Fortunately, it occurred on the first one I tried, but I don’t know why.
Thanks for your help.  I am interested in knowing why this problem occurs, if you are able to diagnose it further.
Alvin Schatte


From: Carl Eastlund 
Sent: Wednesday, September 04, 2013 9:38 PM
To: Alvin Schatte 
Cc: Racket Users 
Subject: Re: [racket] Question on error message

Alvin,


Thanks for the source.  Unfortunately, I can't run what you sent because it's missing at least one file.  Try the following when sharing code for debugging purposes:


1. Use a site like pastebin.com or gist.github.com where you can easily paste and share a file without copying an attachment to many people's inboxes over a mailing list.

2. Include all necessary files, or better yet reduce the example to one file.

3. Similarly, reduce dependencies on third-party libraries such as planet packages if possible.


Right now I'm missing "diff-e solver.rkt" and I have to install "wmfarr/simple-matrix:1:1", which is doable but inconvenient.  Thanks for the question and followup, and I'm happy to help if you can post a complete example.


Carl Eastlund

On Wed, Sep 4, 2013 at 10:22 PM, Alvin Schatte <AlvinSchatte at skytex.net> wrote:

  Hello Carl,
  Thank you for looking at this.  I am writing contracts and playing with documentation for a fairly large module that, right now, performs a system identification function.  The file is attached.  I made several changes without “Run”ning, so I’m not sure what changed caused the error.
  Thank you again for your help,
  Alvin Schatte


  From: Carl Eastlund 
  Sent: Wednesday, September 04, 2013 9:06 PM
  To: Alvin Schatte 
  Cc: Racket Users 
  Subject: Re: [racket] Question on error message

  Alvin,


  That looks like an internal error message from some language feature you're using, unless you're using something like begin-lifted or syntax-local-lift-expression directly.  Often the contract system generates names for internal use like "lifted.171", but there shouldn't be duplicate definitions, and if there are, it's likely not your fault.  Can you share the code that causes this error message?  If so, someone may be able to diagnose the error.  Otherwise, with just the error message, we don't have much to go on.


  Carl Eastlund

  On Wed, Sep 4, 2013 at 9:59 PM, Alvin Schatte <AlvinSchatte at skytex.net> wrote:

    Hello,
    I got the following error message after <Ctrl-R> in Dr. Racket.  I am not sure what  it means:

    module: duplicate definition for identifier in: lifted.171

    Could someone explain it to me?
    Alvin Schatte


    ____________________
      Racket Users list:
      http://lists.racket-lang.org/users



  No virus found in this message.
  Checked by AVG - www.avg.com
  Version: 2013.0.3392 / Virus Database: 3222/6639 - Release Date: 09/04/13


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3392 / Virus Database: 3222/6639 - Release Date: 09/04/13
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130906/8f21f4ed/attachment-0001.html>

Posted on the users mailing list.