skapata has quit [Read error: Connection reset by peer]
to-hu has joined #racket
DragonMaus has quit [Ping timeout: 256 seconds]
DragonMaus has joined #racket
m1dnight has quit [Ping timeout: 255 seconds]
m1dnight has joined #racket
szkl has quit [Quit: Connection closed for inactivity]
ec has quit [Remote host closed the connection]
ec has joined #racket
danse-nr3 has joined #racket
szkl has joined #racket
skapata has joined #racket
Origin has joined #racket
notzmv has quit [Ping timeout: 255 seconds]
parnikkapore has quit [Quit: Leaving]
danse-nr3 has quit [Ping timeout: 260 seconds]
szkl has quit [Quit: Connection closed for inactivity]
<samth>
skeemer: you would need to search on pkgs.racket-lang.org
to-hu has quit [Ping timeout: 276 seconds]
sagax has quit [Quit: Konversation terminated!]
dhil has joined #racket
notzmv has joined #racket
danse-nr3 has joined #racket
dhil has quit [Ping timeout: 240 seconds]
dhil has joined #racket
Achylles has joined #racket
danse-nr3 has quit [Ping timeout: 260 seconds]
Achylles has quit [Remote host closed the connection]
dhil has quit [Ping timeout: 256 seconds]
mdhughes has quit [Ping timeout: 268 seconds]
mdhughes has joined #racket
<kengruven>
i've got a function in typed/racket which takes Any, and does something of the form: (and (my-type? x) (fn-which-takes-my-type x)). how can i make this pass the type checker?
<kengruven>
i tried simply wrapping the 2nd x with (cast x MyType), but it says "Unable to protect opaque type". i'm not sure what ann does (or how it's different from cast) but it doesn't seem to do anything here.
szkl has joined #racket
avocadoist has joined #racket
rampart has quit [Ping timeout: 246 seconds]
<samth>
kengruven: is my-type? a predicate for your type?
<kengruven>
samth: yes, but it's just a racket function. i just saw there's also a "make-predicate" in typed/racket and it's not clear if that's special to the type checker somehow.
<samth>
kengruven: what is your type?
<samth>
does the type checker know that my-type? and your type are connected in some way?
<kengruven>
probably not? besides having a similar name, i don't know how to suggest to it that when this function returns #t, it's of that type.
<kengruven>
i'm representing quaternions as math/array col-matrix of size 4. i've got (define-type Quaternion (Matrix Real)), and a function (quaternion? [q : Any]) : Boolean which also checks the size. i haven't figured out how to encode the size in the t/r Type.
avocadoist has quit [Remote host closed the connection]
avocadoist has joined #racket
szkl has quit [Quit: Connection closed for inactivity]