Commit Graph

447 Commits (9a22d35cb712bb7cb467e79658859a545d732bf0)

Author SHA1 Message Date
Doug Coleman 9a22d35cb7 words: Change word -> last-word, set-word -> set-last-word. 2013-03-23 16:12:03 -07:00
Doug Coleman 40317be207 classes.union: Fix circular reference between multiple definitions. Fixes #420 lol again.
Could be cleaner perhaps? I'm not seeing how right now.
2013-03-23 14:59:07 -07:00
Doug Coleman 38f11415c8 assocs: Add of and ?of. Change all the things at once! Fixes #701. 2013-03-23 14:59:07 -07:00
Doug Coleman b0b64fb39e classes.union: Disallow unions to refer to themselves. Fixes #420 lol. Thanks @mrjbq7 for the patch. 2013-03-23 13:18:25 -07:00
Doug Coleman ce91d0cc1d classes: Add a check that arguments to classoids are themselves classoids.
Introduce a new word-prop that makes tuple-class words classoids at parse-time so that
self-referential tuple definitions with maybe{} work, e.g. TUPLE: node { next maybe{ node } } ;
Add unit test.
Fixes #766.
2013-03-22 16:00:46 -07:00
Doug Coleman 56720db9bd classes.builtin: Add the BUILTIN: keyword which lets builtin classes show up in source files. Probably could use save-location to allow editing, but it seemed to break things. 2013-03-10 12:05:38 -07:00
John Benediktsson eb273a59cf classes: finish converting update-map to use hash-sets. 2013-03-08 23:23:39 -08:00
John Benediktsson f076fef4a3 classes: change class-usage to return a sequence like it's documented to do. 2013-03-08 23:06:16 -08:00
John Benediktsson 03e6f48943 classes: use faster closure in class-usages. 2013-03-08 23:04:31 -08:00
John Benediktsson c1c5b63456 Revert "graphs: change closure to use a set and operate on sequences."
This reverts commit 2cc201a38a.
2013-03-08 18:08:09 -08:00
John Benediktsson 2cc201a38a graphs: change closure to use a set and operate on sequences. 2013-03-08 17:53:31 -08:00
John Benediktsson ed0de7b246 classes.tuple: require boa words to have tuple-class arguments. 2013-03-08 14:56:07 -08:00
John Benediktsson 26131a5c3e classes: store implementors in hash-sets. 2013-03-08 10:29:50 -08:00
John Benediktsson fb9ca9818c core: some more cleanup of USING lists. 2013-03-05 10:48:14 -08:00
John Benediktsson 6398bea5db classes.algebra: fix docs for class<=. 2012-09-22 21:20:54 -07:00
John Benediktsson cb88625ff0 classes.tuple: adding set-slots and from-slots. 2012-09-22 13:48:25 -07:00
John Benediktsson 4a347ebecf classes.builtin: fold type>class. 2012-09-21 11:44:14 -07:00
Doug Coleman 04a7bd1236 classes.tuple: Fix unit test. 2012-08-03 15:11:30 -07:00
Doug Coleman d15a2357d1 core: Throw an error when assigning a bignum to a fixnum tuple slot if the bignum doesn't fit. Fixes #594. 2012-08-03 14:59:59 -07:00
Doug Coleman 008d035b39 classes.tuple: Fix unit tests related to coerce 2012-07-30 18:41:22 -07:00
Doug Coleman 376bc1bdf1 classes.tuple: Save slot name and tuple in no-slot error. 2012-07-24 14:05:58 -07:00
John Benediktsson 854ad5ca98 classes.tuple: moving get-slot-named and set-slot-named from db.types. 2012-07-24 11:55:16 -07:00
John Benediktsson 7104c2d7b9 using the new H{ } make. 2012-07-19 09:50:09 -07:00
Doug Coleman dca84c4194 issue #358: Rename check-method and check-mixin-class TUPLE:s to ERROR:s. 2012-06-21 08:35:41 -07:00
Doug Coleman 8dc2a16a2d classes.tuple: Better error message for tuples that try to inherit from themselves. Add must-fail tests for tuples that try to inherit from themselves and for inheriting from a generic.
Fixes #412.
2012-06-01 16:59:03 -07:00
Doug Coleman cb42258144 classes:
- Allow methods to dispatch off union{ } and intersection{ } classes.
- Add not{ } anonymous-complement syntax.
- Define class-name for anonymous-union/intersection/complement and maybes, and clean up pprint.
- Change maybe: foo to maybe{ foo }
- Call sort-classes when making anonymous-union/anonymous-intersection classes so that they are canonicalized.
2012-05-03 19:45:30 -07:00
John Benediktsson e556ff9fc7 using reverse! when possible. 2012-04-25 20:09:36 -07:00
John Benediktsson 19421c902c classes.algebra: make class= and only-classoid? use short-circuit logic. 2012-04-18 12:00:24 -07:00
Doug Coleman d7aee3256e classes.maybe: Change the type of maybe's class slot. As a result, maybe: maybe: integer is valid now, so fix the unit tests and its prettyprinting. 2011-11-23 01:43:02 -08:00
Doug Coleman e09de9d6a1 classes.maybe: make maybe's slot type a classoid so you can do maybe: union{ }. Fix prettyprinting of anonymous-union/intersection. Fixes #427, fixes #428. 2011-11-23 01:19:09 -08:00
Doug Coleman 3e2fc2f0cb classes: optimize instance? for classoids 2011-11-22 20:38:07 -08:00
Doug Coleman 30ade9023c classes: add syntax for intersection{ and union{ anonymous classes. make classoid a mixin. 2011-11-22 18:49:42 -08:00
Doug Coleman 627bce6615 classes: Make methods dispatch on maybes. Fix a couple bugs in the implementation of maybe. classoid? is now a dumb test if an object could be a well-formed classoid; valid-classoid? tests for well-formedness. Move maybe tests. Make pprint* work better on methods. 2011-11-22 15:12:20 -08:00
Doug Coleman d3a4e72f95 classes.maybe: move maybe definition from classes.union to classes.maybe 2011-11-22 02:46:36 -08:00
Doug Coleman 14dbf929ee classes.union: Define a maybe: word that makes a tuple that acts as an anonymous union for a type and f. Updated all the places we define UNION: ?foo foo POSTPONE: f ;. Fixes #416 and lots of headaches. 2011-11-22 01:56:13 -08:00
Slava Pestov 2cf72ef255 Fix bootstrap 2011-11-12 16:45:04 -08:00
Slava Pestov 081527628d Fix ambiguity between 'initial: f' and no initial value in a slot spec. Fixes #382 2011-11-12 15:35:51 -08:00
Doug Coleman be9f8a99f0 Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Slava Pestov 52cf183e4e classes.union: unions of built-in types now have more efficient predicates. Fixes #292 2011-10-29 17:11:03 -07:00
Doug Coleman b61f9f6903 Forget some classes after unit tests so that running "classes" test succeeds multiple times in a row 2011-10-24 16:59:46 -07:00
Doug Coleman 96da8df16e Rename class to class-of 2011-10-24 06:47:42 -05:00
John Benediktsson a13676f3b6 Remove stack effects from HELP: declarations. 2011-10-20 19:36:11 -07:00
John Benediktsson f2741b34a4 Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed. 2011-10-18 13:19:39 -07:00
John Benediktsson f419934d6a Cleanup lint warnings. 2011-10-14 11:47:24 -07:00
Doug Coleman 60b1115452 Rename forget-struct-slot-accessors -> forget-slot-accessors 2011-10-06 13:21:18 -07:00
John Benediktsson 7e8d598265 classes.tuple: can't assume hashcode* returns fixnum. 2011-10-06 11:53:50 -07:00
Doug Coleman 921c81d92a Document reset-class, forget-class, forget-method. Use lookup-method in see, fix gpu.render for method->lookup-method renaming. Fixes #232. 2011-10-04 10:40:48 -07:00
Doug Coleman e75e2b1f14 Make M\ throw an error upon lookup failure. Change method -> ?lookup-method, lookup-method is the throwing version of ?lookup-method. Fixes #229. 2011-10-03 15:49:49 -07:00
Doug Coleman e1678b928a Rename spread>quot to deep-spread>quot, and spread>quot-shallow to shallow-spread>quot. 2011-10-02 20:25:39 -07:00
Doug Coleman bce0dd9272 Spread now infers with the correct stack effect. Make spread>quot-shallow which trims empty quotations off the head of the spread sequence. Fixes #139. 2011-10-02 18:35:01 -07:00