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

Add reference for subtyping #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion poof.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ a function from @r[Self] and @r[Super] to @r[Self].
(code:comment "(deftype (Proto Self Super) (Fun Self Super -> Self st: (<: Self Super)))")
(code:comment "fix : (Fun (Proto Self Super) Super -> Self st: (<: Self Super))")
(code:comment "mix : (Fun (Proto Self Super) (Proto Super Sup2) -> (Proto Self Sup2))")
(code:comment "Note: \"<:\" is a Type Constraint for subtyping (see Appendix B.4)")
]

@(noindent)
Expand Down Expand Up @@ -263,7 +264,7 @@ imaginary values bound to the respective slots @r[x] and @r[y] of its
]

@(noindent)
That prototype doubles the number in slot @r[x] that it @emph{inherits} from its @r[super] record:
This prototype doubles the number in slot @r[x] that it @emph{inherits} from its @r[super] record:
@Examples[
(code:comment "$double-x : (Proto (Fun 'x -> Number | A) (Fun 'x -> Number | A))")
(define ($double-x self super)
Expand Down