Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c91c953
allow multiple `~&` in a function call, too
mflatt Oct 25, 2022
8d7490f
classes with subclass and constructors
mflatt Oct 27, 2022
8a95937
first try at class-binder protocol
mflatt Oct 27, 2022
b4146bc
support binding and annotation customization in `class`
mflatt Oct 27, 2022
9a7b6fa
"callable" -> "entry point"
mflatt Oct 27, 2022
9038d8b
`class` block allows a mixture of definitions, expressions, and clauses
mflatt Oct 28, 2022
b891ae4
add `field` clause to `class`
mflatt Oct 28, 2022
662c970
build in support for `class` field keywords
mflatt Oct 28, 2022
0c921d9
fix interaction of keyword fields and custom constructors
mflatt Oct 29, 2022
b602c02
support default-value expressions for `class` fields
mflatt Oct 29, 2022
3d73b05
implement assignment for mutable fields
mflatt Oct 29, 2022
13f8a03
typos
mflatt Oct 29, 2022
47abcd3
subclasses and customization of bindings and annotations
mflatt Nov 1, 2022
c6597d8
typo
mflatt Nov 1, 2022
e12ac51
improve organization of `class` implementation
mflatt Nov 1, 2022
7cbf216
split `class` implementation into multiple files
mflatt Nov 1, 2022
3779987
first cut at methods
mflatt Nov 2, 2022
77ed295
private fields and methods
mflatt Nov 3, 2022
7c76429
add `unimplemented`, forcing a subclass to implement a method
mflatt Nov 7, 2022
f811eeb
add `super` for calling superclass methods
mflatt Nov 7, 2022
06bc952
add interfaces
mflatt Nov 8, 2022
ea7ace6
add private interface implementation
mflatt Nov 8, 2022
6357c82
add to "Open Issues" section of the design document
mflatt Nov 8, 2022
be94fd7
".rkt" -> ".rhm" for some tests files
mflatt Nov 8, 2022
668c54d
support `export` in `class` and `interface`
mflatt Nov 10, 2022
d6c1a9a
provide method-calling procedures from class and interface namespaces
mflatt Nov 10, 2022
0b36d67
rename `unimplemented` to `abstract`
mflatt Nov 11, 2022
5fd939d
change custom constructor, etc., to use `super`
mflatt Nov 11, 2022
5ed0959
revise custom constructor/binding/annotation and internal
mflatt Nov 14, 2022
4ff5922
allow signatures for abstract methods
mflatt Nov 17, 2022
dbe8104
default printing for objects with keyword and private arguments
mflatt Nov 17, 2022
5ee09ad
enforce method result annotations on overriding methods
mflatt Nov 17, 2022
3ca0a6b
add property methods
mflatt Nov 19, 2022
dbb1cae
more class overview
mflatt Nov 19, 2022
13f11c5
first cut at printing customization
mflatt Nov 19, 2022
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
16 changes: 8 additions & 8 deletions demo.rhm
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,15 @@ import:
racket/base open:
only: atan

annotation.macro 'AlsoPosn': values('Posn', '')
annot.macro 'AlsoPosn': values('Posn', '')
Posn(1, 2) :: AlsoPosn // prints Posn(1, 2)

bind.macro 'AlsoPosn ($x, $y) $tail ...':
values('Posn($x, $y)', '$tail ...')

annotation.macro 'Vector':
values(annotation_meta.pack_predicate('fun (x): x is_a Posn',
'(($(statinfo_meta.dot_provider_key), vector_dot_provider))'),
annot.macro 'Vector':
values(annot_meta.pack_predicate('fun (x): x is_a Posn',
'(($(statinfo_meta.dot_provider_key), vector_dot_provider))'),
'')


Expand Down Expand Up @@ -572,7 +572,7 @@ get_pts_x([Posn(1, 2)])
fun nested_pt_x(pt :: matching(Posn(Posn(_, _), _))):
pt.x.x

annotation.macro 'ListOf ($contract ...) $tail ...':
annot.macro 'ListOf ($contract ...) $tail ...':
values('matching([_ :: ($contract ...), $('...')])',
'$tail ...')

Expand Down Expand Up @@ -640,9 +640,9 @@ dot.macro 'myint_dot_provider $left $dot $right':
| 'is_zero': '$left .= 0'
| 'add': 'fun (v -: MyInt) -: MyInt: $left + v'

annotation.macro 'MyInt':
values(annotation_meta.pack_predicate('fun (x): x is_a Integer',
'(($(statinfo_meta.dot_provider_key), myint_dot_provider))'),
annot.macro 'MyInt':
values(annot_meta.pack_predicate('fun (x): x is_a Integer',
'(($(statinfo_meta.dot_provider_key), myint_dot_provider))'),
'')

val (one -: MyInt): 1
Expand Down
Loading