Skip to content

docs: holes and bidirectionality#956

Merged
brprice merged 1 commit intomainfrom
brprice/doc-hole-bidir
Apr 25, 2023
Merged

docs: holes and bidirectionality#956
brprice merged 1 commit intomainfrom
brprice/doc-hole-bidir

Conversation

@brprice
Copy link
Copy Markdown
Contributor

@brprice brprice commented Apr 23, 2023

No description provided.

@brprice brprice requested a review from a team April 23, 2023 18:57
Comment thread primer/src/Primer/Core.hs
Comment on lines +219 to +221
-- annotate with a hole): @{? λx.x : ? ?}@. The other possible choice
-- is to require the wrapped expression to be checkable against the
-- hole type: this is mildly more permissive since a bare lambda is
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think that changing to this other approach may be better.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think that changing to this other approach may be better.

I'm a bit confused by this comment: nothing is changing here, is it? We're just documenting the current behavior?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean you're proposing we stick with the current implementation, rather than #931?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing is changing in this PR, just documenting the current behaviour.

I still think we should move ahead with #931.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, ok, thanks for clarifying. I had worried that this PR meant you'd changed your mind on #931.

@brprice brprice force-pushed the brprice/doc-hole-bidir branch from deed325 to b38a3d9 Compare April 23, 2023 18:59
@dhess
Copy link
Copy Markdown
Member

dhess commented Apr 23, 2023

@brprice
Copy link
Copy Markdown
Contributor Author

brprice commented Apr 25, 2023

Are these old issues related, and do they need revisiting?

* [Can we avoid having syn holes? #70](https://github.com/hackworthltd/primer/issues/70)

I don't think this is particularly related -- it talks about viewing holes from the outside, and the current pr is about viewing from the inside.

* [Should we prevent annotations of type 'hole'? #85](https://github.com/hackworthltd/primer/issues/85)

This is related because if we prevent this, then writing {? t : ? ?} would not be legal. Thus #85 is more palatable if we also implement #931.

* [Surprising behavior regarding function application and annotations #107](https://github.com/hackworthltd/primer/issues/107)

This seems fairly unrelated to me.


In general it would be nice to revisit all those issues, but I don't currently have any good ideas about them. (One half-baked idea is to do more inference / record constraints -- then at least we would be able to tell the student when a hole annotation is unfillable)

@brprice brprice added this pull request to the merge queue Apr 25, 2023
Merged via the queue into main with commit bf6b532 Apr 25, 2023
@brprice brprice deleted the brprice/doc-hole-bidir branch April 25, 2023 16:31
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.

3 participants