-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support prop:evt #1229
base: master
Are you sure you want to change the base?
support prop:evt #1229
Conversation
b452903
to
f5c0ca1
Compare
|
||
(ann (sync (aaa1 ch)) Number) | ||
|
||
(struct aaa2 ([evt : (Channelof Number)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests for cases where 1. the designated field type is not an event type 2. the lambda returns a non-event
"expected: a function that takes only one argument")) | ||
(if (subtype rng-t (-evt Univ)) | ||
rng-t | ||
;; if the return type is not an event, we make an event type using the structure type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about polymorphic structures? tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to address more of the things in the top comment before moving forward here?
I feel like my planned ad-hoc fixes/hacks would work, but I am planning to take a look at type families and see if I get some inspiration so we can solve this problem at a higher level. |
prop:procedure
andprop:evt
at the same timecloses #167
The basic idea is 1. we should check
prop:evt
in the similar way as we checkprop:procedure
, and also we handle their differences correctly via a table + high order functions2. so the structure type rep should store a list of extra types extracted from values for those properties.