From 104f8c63cab467a5638bdd26cca420a7bc0b11d7 Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Fri, 14 May 2021 18:15:16 +0800 Subject: [PATCH] Add reference for subtyping notation --- poof.scrbl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poof.scrbl b/poof.scrbl index 7766cde..a2df9a2 100644 --- a/poof.scrbl +++ b/poof.scrbl @@ -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) @@ -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)