Folks (Neil?),

Another type issue, but this time with pict3d.
I am trying to use the following code to display a sphere.
But there seems to be an issue throwing up a warning. A warning
that “will become an error in a future release”. A warning that
also seems to be using up a lot of juice to print itself out.

Has anyone any idea where to improve the type declarations to
suppress this?

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#lang typed/racket/gui
(require pict3d)

(define f (new frame% [label "T"] [width 400] [height 400]))

(new pict3d-canvas% [parent f] [pict3d (sphere origin 1/2)])

(send f show #t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Generates numerous errors of the form:
------------------------------------------------------------
cpointer?: contract violation
  any-wrap/c: Unable to protect opaque value passed as `Any`
  value: #<cpointer>
  This warning will become an error in a future release.
  in: the 1st argument of
      a part of the or/c of
      (or/c
       struct-predicate-procedure?/c
       (-> Any boolean?))
  contract from: (interface for cpointer?)
  blaming: <pkgs>/pict3d/typed/opengl/ffi-types.rkt
   (assuming the contract is correct)
  at: <pkgs>/pict3d/typed/opengl/ffi-types.rkt:19.20
------------------------------------------------------------

ffi-types.rkt:19 is:
 ..
 17  (require/typed
 18   ffi/unsafe
*19   [#:opaque CPointer cpointer?]  ; includes Bytes and other things that can 
be used as cpointers
 20   [#:opaque CType ctype?]
 21   )
 ..
which seems perfectly innocuous to me :-/

Tim

-- 
Tim Brown CEng MBCS <tim.br...@cityc.co.uk>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                City Computing Limited · www.cityc.co.uk
      City House · Sutton Park Rd · Sutton · Surrey · SM1 2AE · GB
                T:+44 20 8770 2110 · F:+44 20 8770 2130
────────────────────────────────────────────────────────────────────────
City Computing Limited registered in London No:1767817.
Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
VAT No: GB 918 4680 96

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to