Skip to content
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

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

support prop:evt #1229

wants to merge 16 commits into from

Conversation

capfredf
Copy link
Member

@capfredf capfredf commented Apr 20, 2022

  • support structures associated with prop:procedure and prop:evt at the same time
  • properly handle polymorphic structure types
  • change the documentation
  • more tests

closes #167

The basic idea is 1. we should check prop:evt in the similar way as we check prop:procedure, and also we handle their differences correctly via a table + high order functions
2. so the structure type rep should store a list of extra types extracted from values for those properties.

@capfredf capfredf marked this pull request as draft April 20, 2022 18:14
@capfredf capfredf force-pushed the fix-prop-evt branch 2 times, most recently from b452903 to f5c0ca1 Compare April 20, 2022 18:17

(ann (sync (aaa1 ch)) Number)

(struct aaa2 ([evt : (Channelof Number)])
Copy link
Member Author

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

@capfredf capfredf marked this pull request as ready for review April 27, 2022 18:41
@capfredf capfredf requested a review from samth April 27, 2022 18:41
"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
Copy link
Member Author

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?

@capfredf capfredf marked this pull request as draft April 29, 2022 17:15
Copy link
Member

@samth samth left a 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?

@capfredf
Copy link
Member Author

capfredf commented Sep 9, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom events require casting
2 participants