Commit Graph

270 Commits

Author SHA1 Message Date
Sam Tobin-Hochstadt
6e1954d79b Add `struct:' 2010-06-22 16:29:35 -04:00
Sam Tobin-Hochstadt
bce2cedf38 Typecheck `map' expression, not just #'map. 2010-06-22 10:12:54 -04:00
Sam Tobin-Hochstadt
0c7c722e16 support `map' over multiple ListDots with the same bound
- also support ListDots + Listof (map errors when not same length)
2010-06-21 18:30:30 -04:00
Sam Tobin-Hochstadt
339add9f78 Implement substitutions as hash tables from vars to subst-rhs.
- add convenience function for generating substitutions
 - give trivial substitution for unreferenced index variables
2010-06-21 18:30:28 -04:00
Sam Tobin-Hochstadt
44d46e4cd7 Refactor substitution.
- new file types/substitute
 - use structs for substitutions
2010-06-21 18:30:28 -04:00
Stevie Strickland
b5d4d54d45 The initial shot at extending cgen and friends to take both X and Y.
This doesn't fully work, in that more test cases are broken.  However,
this is mostly due to questionable inference rules in the past, and
so fixing these errors should lead to a more correct inference algorithm.

(i.e. we need to handle things like (List X ... a) (List Y .. b),
where a and b are not the same bound.  We'd started this work before,
but never actually gone through with it, since smashing regular and
dotted type variables into the same environment meant some things
magically worked when they possibly shouldn't have.)
2010-06-21 18:30:26 -04:00
Sam Tobin-Hochstadt
d886331807 Various small assorted fixes. 2010-06-21 18:30:25 -04:00
Sam Tobin-Hochstadt
82e7d281cb More progress on refactoring infer 2010-06-21 18:30:25 -04:00
Sam Tobin-Hochstadt
18f45c4138 Fix a bunch of uses of `infer' et al. 2010-06-21 18:30:25 -04:00
Sam Tobin-Hochstadt
99e499a503 Change inference to take into account index vs regular vars. 2010-06-21 18:30:24 -04:00
Sam Tobin-Hochstadt
fe9395fdbf Add case to be fixed 2010-06-21 18:30:23 -04:00
Sam Tobin-Hochstadt
a93aecbed7 Special case for (apply values ListDots) 2010-06-21 18:30:20 -04:00
Sam Tobin-Hochstadt
d570006db8 Add index-env.
- Remove Dotted and DottedBoth values from tvar-env
 - Abstract env extension and lookup for tvar/index-env
 - Abstract index inference
 - Remove pointless parameterizations
2010-06-21 18:29:58 -04:00
Sam Tobin-Hochstadt
4c3f279ab9 Eliminate expressions with dotted pre-types.
- Now looks for (List T ...) types.
 - special handling of `map', `andmap', `ormap' when list arg is dotted
 - remove tc-dots-unit
2010-06-21 18:29:57 -04:00
Sam Tobin-Hochstadt
4cbeb0b2f0 Change type of ... rest args to have (List T ...) types. 2010-06-21 18:29:56 -04:00
Sam Tobin-Hochstadt
50f93b9ed7 More environment refactoring.
- rationalize naming of files
- split files by env constructed
2010-06-21 18:29:55 -04:00
Sam Tobin-Hochstadt
647c4eef59 Refactor environments.
- mapping stored as dict
 - use id tables for identifiers
 - use env-filter instead of filter
 - eliminate spurious use of conses
2010-06-21 18:29:54 -04:00
Sam Tobin-Hochstadt
4925e7e51f Refactor provide handling.
- use id-tables instead of lists
 - smarter iteration
 - prepare for eliminating declarations when not needed, but don't do it yet
2010-06-21 15:42:52 -04:00
Stevie Strickland
0aae2c866f Fix use of add-type-expr from commit 5d835ded. 2010-06-19 14:58:52 -04:00
Sam Tobin-Hochstadt
1e15ce1f32 Fix error message for 1-arg apply 2010-06-19 14:58:52 -04:00
Vincent St-Amour
5d835ded47 Added the type of the 1 literals in expressions of the form (- x 1) to
the type table.
2010-06-18 17:43:05 -04:00
Sam Tobin-Hochstadt
0262ef681a handle multiple body expression properly 2010-06-17 12:50:30 -04:00
Sam Tobin-Hochstadt
bdbb6d48e6 Try harder to find types for loop variables.
- use `find-annotation' more
 - recognize (let ([x y]) ...)
2010-06-17 11:26:33 -04:00
Sam Tobin-Hochstadt
f73d63e1af eq? is a predicate for eof 2010-06-15 14:59:08 -04:00
Sam Tobin-Hochstadt
1cff0a1f85 Actually typecheck actuals even when there's a type annotation. 2010-06-11 19:35:56 -04:00
Sam Tobin-Hochstadt
5f069ed4bb Refactor #%module-begin and #%top-interaction for Typed Scheme. 2010-06-11 11:55:21 -04:00
Sam Tobin-Hochstadt
0379e534e3 New interface for unstable/mutated-vars
- functional hash tables
 - fix clients
2010-06-10 13:28:29 -04:00
Sam Tobin-Hochstadt
78832fe332 Support case-lambda with multiple branches with keyword arguments. 2010-06-08 17:50:48 -04:00
Sam Tobin-Hochstadt
7f300a2c4f Special-case (- x 1) for use in loops. 2010-06-08 12:05:56 -04:00
Sam Tobin-Hochstadt
7df8e32793 Properly handling immutable invariant structs. 2010-06-07 14:03:06 -04:00
Sam Tobin-Hochstadt
d4a8c52c71 Fix error message for multiple values. 2010-05-27 10:10:26 -04:00
Sam Tobin-Hochstadt
460bb348e1 Better internal error messages. 2010-05-24 14:05:05 -07:00
Sam Tobin-Hochstadt
986318065d Remove tc-toplevel from the typechecking unit. 2010-05-24 14:03:14 -07:00
Sam Tobin-Hochstadt
5b0f705b83 Only do abstraction of filters at `let's. 2010-05-24 14:01:00 -07:00
Sam Tobin-Hochstadt
9fe3747a19 Allow expected type to have weaker filters and objects.
Closes PR 10729.
2010-05-19 15:14:18 -05:00
Sam Tobin-Hochstadt
638245e4c5 Better type annotation support.
- Delay more errors for additional reporting.
 - Don't re-check expressions that were checked for inference.
 Closes PR 10098.
2010-05-19 10:10:54 -05:00
Sam Tobin-Hochstadt
535dc73fad More fixes for Vincent. 2010-05-17 18:03:34 -04:00
Sam Tobin-Hochstadt
7ecf424ff8 Fix internal error detected by vincent. 2010-05-17 16:06:27 -05:00
Sam Tobin-Hochstadt
21b5c25c90 Add annotation to test.
Fix default case for `vector-set!'
2010-05-14 11:00:23 -04:00
Sam Tobin-Hochstadt
ff36a6e8d1 sensible handling of literal vectors 2010-05-14 11:00:23 -04:00
Sam Tobin-Hochstadt
7ac925695f more sensible version of het vectors.
add vector-length, vector-set!
2010-05-14 11:00:23 -04:00
Sam Tobin-Hochstadt
798a7f2a3c fix typo 2010-05-14 11:00:22 -04:00
Sam Tobin-Hochstadt
f40000c9c7 Fix het vec with strange expected types 2010-05-14 11:00:22 -04:00
Sam Tobin-Hochstadt
ec14f2c0b8 Finish het vectors 2010-05-14 11:00:22 -04:00
Sam Tobin-Hochstadt
2c03f2223b mostly done with heterogenous vectors 2010-05-14 11:00:22 -04:00
Sam Tobin-Hochstadt
814c02664e Don't generate extra filters unless they're useful. 2010-05-13 13:37:24 -04:00
Sam Tobin-Hochstadt
a7a56ce856 abstract even when out of bindings 2010-05-12 21:34:18 -04:00
Sam Tobin-Hochstadt
264bf78559 Fix typo 2010-05-12 18:43:55 -04:00
Sam Tobin-Hochstadt
4ceda99700 Updates along useless paths are not errors. 2010-05-12 18:24:19 -04:00
Sam Tobin-Hochstadt
41f0152435 Allow dummy filtersets 2010-05-12 17:31:58 -04:00