Commit Graph

435 Commits (af1b167c2869a57ffb3415044075a42991ce4071)

Author SHA1 Message Date
John Benediktsson f06bfef276 classes: store implementors in hash-sets. 2013-03-08 10:29:50 -08:00
John Benediktsson 12216b1246 core: some more cleanup of USING lists. 2013-03-05 10:48:14 -08:00
John Benediktsson 02d45f1ac8 classes.algebra: fix docs for class<=. 2012-09-22 21:20:54 -07:00
John Benediktsson 81a894f05f classes.tuple: adding set-slots and from-slots. 2012-09-22 13:48:25 -07:00
John Benediktsson f70932040d classes.builtin: fold type>class. 2012-09-21 11:44:14 -07:00
Doug Coleman af9ac34db2 classes.tuple: Fix unit test. 2012-08-03 15:11:30 -07:00
Doug Coleman cd9dd9d752 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 c26ad1eb10 classes.tuple: Fix unit tests related to coerce 2012-07-30 18:41:22 -07:00
Doug Coleman 178f79decf classes.tuple: Save slot name and tuple in no-slot error. 2012-07-24 14:05:58 -07:00
John Benediktsson 30a198e2ab classes.tuple: moving get-slot-named and set-slot-named from db.types. 2012-07-24 11:55:16 -07:00
John Benediktsson 559b5bfa5b using the new H{ } make. 2012-07-19 09:50:09 -07:00
Doug Coleman 7441fa81fc issue #358: Rename check-method and check-mixin-class TUPLE:s to ERROR:s. 2012-06-21 08:35:41 -07:00
Doug Coleman cee0b9e854 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 3507b9bad7 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 5e16810075 using reverse! when possible. 2012-04-25 20:09:36 -07:00
John Benediktsson 837b22336e classes.algebra: make class= and only-classoid? use short-circuit logic. 2012-04-18 12:00:24 -07:00
Doug Coleman 64bbd248d5 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 0700dca792 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 f90bc5cdb6 classes: optimize instance? for classoids 2011-11-22 20:38:07 -08:00
Doug Coleman 82c5388f68 classes: add syntax for intersection{ and union{ anonymous classes. make classoid a mixin. 2011-11-22 18:49:42 -08:00
Doug Coleman cab0369fec 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 fac17c10ba classes.maybe: move maybe definition from classes.union to classes.maybe 2011-11-22 02:46:36 -08:00
Doug Coleman 067f9830ef 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 07ef058fb0 Fix bootstrap 2011-11-12 16:45:04 -08:00
Slava Pestov 03d6665166 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 c731dc6edb Rename lookup to lookup-word. 2011-11-06 16:00:00 -08:00
Slava Pestov c14f0ef698 classes.union: unions of built-in types now have more efficient predicates. Fixes #292 2011-10-29 17:11:03 -07:00
Doug Coleman df64529fb5 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 f9257959fd Rename class to class-of 2011-10-24 06:47:42 -05:00
John Benediktsson 5a943b32c4 Remove stack effects from HELP: declarations. 2011-10-20 19:36:11 -07:00
John Benediktsson 80e1c8e3f2 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 378786599d Cleanup lint warnings. 2011-10-14 11:47:24 -07:00
Doug Coleman cca76e0f6e Rename forget-struct-slot-accessors -> forget-slot-accessors 2011-10-06 13:21:18 -07:00
John Benediktsson 7a4ffd92ed classes.tuple: can't assume hashcode* returns fixnum. 2011-10-06 11:53:50 -07:00
Doug Coleman be3eebf719 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 181f11faa8 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 8504b17aad 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 38feae0e8f 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
John Benediktsson 195d5834d4 classes.tuple: switch to python's tuplehash(). Fixes #153. 2011-10-02 13:49:45 -07:00
Doug Coleman 671f19d70f Remove all non-core uses of (scan-token)
Add scan-datum
Add scan-number
Document more words
Fixes #225.
2011-10-02 12:00:08 -07:00
Doug Coleman 76580da5d5 Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183.
Fixes #209.
2011-09-29 11:28:28 -07:00
John Benediktsson 86923107db classes.tuple: error-class should call-next-method before resetting itself. 2011-09-26 11:54:55 -07:00
John Benediktsson f099cd5b4c classes.tuple: adding test cases for error-class and support forget-class. 2011-09-26 11:00:32 -07:00
John Benediktsson 7ef1aecf88 Defining an "error-class", and printing error tuples out with ERROR:. See #188. 2011-09-26 11:00:32 -07:00
John Benediktsson d142dbb456 Revert "classes.singleton: fix "summary" of singletons. Fixes #145."
This reverts commit d820c86974.
2011-09-19 17:46:52 -07:00
John Benediktsson ac75393fbd Revert "classes.mixin: fix definitions for MIXIN:."
This reverts commit f625612f89.
2011-09-19 17:46:40 -07:00
John Benediktsson 8827cbdba1 classes.mixin: fix definitions for MIXIN:. 2011-09-19 17:22:50 -07:00
John Benediktsson 46c417370f classes.singleton: fix "summary" of singletons. Fixes #145. 2011-09-19 16:49:11 -07:00
Doug Coleman 035cc310d9 Fix for parser-notes? being removed 2011-09-07 04:59:35 -05:00
John Benediktsson 9f34c9c676 Spelling fixes to documentation. 2011-08-26 16:20:31 -07:00