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

 
 

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

Submitted by:  Adrián Medraño Calvo <medranocalvo>
Submitted on:  Mon 24 Oct 2016 08:15:32 PM UTC  
 
Category: Scheme librarySeverity: 3 - Normal
Item Group: Bad diagnosticStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Please do - confusing diagnostics should be fixed where possible.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 20 Nov 2016 06:28:27 PM UTCbothnerOpen/ClosedOpen=>Closed
    Mon 31 Oct 2016 06:18:17 AM UTCbothnerStatusNone=>Fixed
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup1