bugKawa - Bugs: bug #46116, Add $bracket-apply$ to (kawa base)

 
 

bug #46116: Add $bracket-apply$ to (kawa base)

Submitter:  None
Submitted:  Sat 03 Oct 2015 08:51:52 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Feature Request Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 07 Oct 2015 08:05:41 PM UTC, comment #1: 

Sure.
I also added $bracket-list$, so you can use [x y z].
Fix and test-case checked in.

Per Bothner <bothner>
Group administrator
Sat 03 Oct 2015 08:51:52 PM UTC, original submission:  

It would be useful for $bracket-apply$ to be exported from (kawa base).

For example, the following snippet:

(define-library (ba)
  (import (kawa base))
  (begin
    (let ((a (int[] #:length 10)))
      (display a))))

(import (ba))

shows the following error:

ba.scm:6:15: warning - no declaration seen for $bracket-apply$
Argument  'gnu.kawa.lispexpr.BracketApply@370e6c0e' to 'apply-to-args' has wrong type (gnu.kawa.lispexpr.BracketApply) (expected: procedure)
        at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:168)
        at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39)
        at ba.run(ba.scm:6)
        at gnu.expr.ModuleBody.run(ModuleBody.java:47)
        at gnu.expr.ModuleBody.run(ModuleBody.java:35)
        at s.run(s.scm:1)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:319)
        at gnu.expr.CompiledModule.evalModule(CompiledModule.java:42)
        at gnu.expr.CompiledModule.evalModule(CompiledModule.java:61)
        at kawa.Shell.runFile(Shell.java:544)
        at kawa.Shell.runFileOrClass(Shell.java:447)
        at kawa.repl.processArgs(repl.java:653)
        at kawa.repl.main(repl.java:773)

As of now, one would need to add the following to the imports, which is quite tricky:

(only (gnu kawa lispexpr BracketApply)
          (instance $bracket-apply$))

Anonymous

 

(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 leigharlie (Original poster)
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-10-07 bothner StatusNone Fixed
        Assigned toNone bothner
        Open/ClosedOpen Closed
    2015-10-04 leigharlie Carbon-Copy- Added leigharlie

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code