Skip to content
Discussion options

You must be logged in to vote

So in short, the type inference completely disregards alternative/group guards. I'm kind of curious what you are expecting as a generated type. The main issue here is that rules are transformed in isolation and not in the context of their calling rule. Especially since seem to expect that a rule is transformed into two distinct types, which is not really something which the current system is able to accomplish. And I believe this would be very hard to handle from a user perspective, as the amount of generated types is 2^n with n being the number of guard arguments in a rule. The only thing which I could reasonably imagine would be akin to something like:

type Expression<next extends boolean>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luan-xiaokun
Comment options

Answer selected by luan-xiaokun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants