Sam Tobin-Hochstadt
219682bbbe
Refactoring of tc-app.
...
- Move `check-below' into its own module
- Move `tc/apply' to its own unit
- Move `tc/funapp' and `tc/funapp1' to own module, outside of unit
2010-07-02 17:25:07 -04:00
Vincent St-Amour
40988d6d54
Added support for recursive types to vector-ref and vector-set!.
2010-07-02 15:48:07 -04:00
Vincent St-Amour
f79f617ee8
Calls to vector now return heterogenous vectors, to preserve length
...
information.
2010-07-02 15:48:03 -04:00
Vincent St-Amour
8c25e46141
Literal vectors are now given HeterogenousVector types to preserve
...
length information.
2010-07-02 15:48:00 -04:00
Vincent St-Amour
636fca1a83
Generalization is now done on vector types.
2010-07-02 15:16:11 -04:00
Sam Tobin-Hochstadt
ed88b9dd1a
Better handling of expected types for `vector'
2010-07-01 17:32:16 -04:00
Sam Tobin-Hochstadt
71bb63c128
Better typing for `make-sequence'.
2010-07-01 17:12:59 -04:00
Vincent St-Amour
62a15df3eb
Added the Nonnegative-Float type.
2010-06-30 14:53:22 -04:00
Vincent St-Amour
dcfb2d8a94
Added the Inexact-Complex type.
2010-06-30 14:53:21 -04:00
Vincent St-Amour
c6373ca7c0
Added special case to the typechecker for (- <positive-fixnum> 1).
2010-06-30 14:53:19 -04:00
Sam Tobin-Hochstadt
c01b239779
Refactor struct type representation.
...
- fields now represented by fld struct.
- mutability on per-field basis
- accessors are per field
This fixes lots of existing bugs, allows future #:mutable on fields.
2010-06-29 17:33:36 -04:00
Sam Tobin-Hochstadt
3c4f1f39b8
minor cleanups
2010-06-29 17:33:35 -04:00
Sam Tobin-Hochstadt
a214f50812
remove unneeded export
2010-06-28 11:12:20 -04:00
Sam Tobin-Hochstadt
0bae63b516
Use get-type/infer for un-annotated defines.
2010-06-28 11:12:20 -04:00
Sam Tobin-Hochstadt
90d8a3cc13
Generalize mutated variables when inferring types.
2010-06-28 11:12:20 -04:00
Sam Tobin-Hochstadt
3251712ef7
More fixnum improvements.
2010-06-24 18:17:01 -04:00
Sam Tobin-Hochstadt
4b1c62c978
Add Fixnum type.
2010-06-24 18:05:55 -04:00
Sam Tobin-Hochstadt
a33f460b25
recreate selector table automatically.
2010-06-24 16:48:10 -04:00
Sam Tobin-Hochstadt
3c8952d63d
Use the correct field numbers in substructs.
...
Maintain table of struct accessors/mutators.
2010-06-24 14:53:38 -04:00
Vincent St-Amour
3c9e7e34db
Switched indexing to integers in the typechecker's special cases for
...
heterogenous vectors and unsafe struct operations.
2010-06-22 18:42:26 -04:00
Vincent St-Amour
7d1040283e
Added support for unsafe struct operations to Typed Scheme.
2010-06-22 18:42:25 -04:00
Vincent St-Amour
379d9a2125
Added support for unsafe operations on heterogenous vectors.
2010-06-22 18:29:57 -04:00
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