bugKawa - Bugs: bug #49431, Missing define-constant and...

 
 

bug #49431: Missing define-constant and define-early-constant in (kawa base)

Submitter:  Adrián Medraño Calvo <medranocalvo>
Submitted:  Mon 24 Oct 2016 08:15:32 PM UTC
   
 
Category:  Scheme library Severity:  3 - Normal
Item Group:  Bad diagnostic Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 20 Nov 2016 06:28:27 PM UTC, comment #3: 

Please do - confusing diagnostics should be fixed where possible.

Per Bothner <bothner>
Group administrator
Sun 20 Nov 2016 03:01:11 PM UTC, comment #2: 

Hmmm... sounds tricky...  I'll keep reporting confusing diagnostics when I find them, as they are quite a stumbling block for begginners (until one becomes accustomed).

The issue is fixed, thank you very much.

Adrián Medraño Calvo <medranocalvo>
Mon 31 Oct 2016 06:18:17 AM UTC, comment #1: 

(1) I added define-constant and define-early-constant to (kawa base). It trned out defined-constant was imported but not exported.

(2) I fixed it so you'll see the "no declaration seen for ..." after "exported but never defined" - at least when compiling with -C.  The problem is "exported but never defined" is reported in an early compilation stage, while "no declaration seen" is reported in a late compilation stage.  So the question is when to stop the compilation process.  It's a bit trickier for interactive mode, so I didn't try that change that.

Per Bothner <bothner>
Group administrator
Mon 24 Oct 2016 08:15:32 PM UTC, original submission:  

This is a combination of two issues (please, find sample code below).  The first one, define-constant and define-early-constant are not in scope after importing (kawa base).  The secondary, is that obtained diagnostic does not mention that these functions had not been declared, only the following:

sometest.scm:7:11: 'somelist' exported but never defined

Would it be possible to print the "warning - no declaration seen for ..." warnings as well?

Please see the code:

(define-library (sometest)
  (import
    (scheme base)
    (kawa base)
    ;; (only (kawa lib prim_syntax) define-constant define-early-constant)
    )
  (export somelist)
  (begin
    (define-constant somelist '(1 2 3))))

Adrián Medraño Calvo <medranocalvo>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  • -email is unavailable- added by medranocalvo (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-20 bothner Open/ClosedOpen Closed
    2016-10-31 bothner StatusNone Fixed
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code