Commit Graph

68 Commits

Author SHA1 Message Date
Vincent St-Amour
e56663c943 Add a predicate field to base types, which makes checking for
subtyping of value types easier.

However, this means that base types can't be marshaled as before,
since these predicates can't be marshaled. Instead, we now marshal
base types as identifiers that refer to their base type object.
2011-01-31 16:39:13 -05:00
Sam Tobin-Hochstadt
b6b840076b Lots more laziness, and useless require removal. 2010-09-09 16:08:03 -04:00
Eli Barzilay
8e0f8dd39c More "~n" -> "\n" changes 2010-08-26 12:11:00 -04:00
Sam Tobin-Hochstadt
b08de170bc Add Futureof' type, types for future' and `touch' 2010-08-25 10:27:07 -04:00
Sam Tobin-Hochstadt
e28b60e44f remove debugging printf 2010-07-09 14:06:46 -04:00
Sam Tobin-Hochstadt
898c92eb1e generalize inferred types for invariant positions 2010-07-09 13:52:39 -04:00
Sam Tobin-Hochstadt
0e400291e7 Fix inference for heterogenous vectors. 2010-07-02 17:25:07 -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
Stevie Strickland
034b22d014 Generate dcon-dotted, and substitute for them.
- generated only in the case where we have two ListDots or two ValuesDots
 - or when -> with the same bound, and fixed argument lengts are identical
 - currently errors if there are any 'fixed' portions
2010-06-21 18:30:29 -04:00
Stevie Strickland
9c22701bd3 Take dcon-dotteds and create an appropriate i-subst/dotted entry. 2010-06-21 18:30:29 -04:00
Stevie Strickland
3f7ca52e37 Add fixed part to dcon-dotted. 2010-06-21 18:30:29 -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
Sam Tobin-Hochstadt
8990459be6 provide more information in inference failures 2010-06-21 18:30:27 -04:00
Sam Tobin-Hochstadt
692dc025c0 fix fail! to use the correct arguments 2010-06-21 18:30:27 -04:00
Sam Tobin-Hochstadt
9f99c914f3 Fix move-to-dmap functions 2010-06-21 18:30:27 -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
Stevie Strickland
ec09139e0a Fix up subst-gen to treat vars and idxs separately. 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
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
a2af89bafd Inference for passing ListDots as Listof. 2010-06-21 18:29:57 -04:00
Sam Tobin-Hochstadt
71939d2826 Handle simple inference of ListDots. 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
4cc86cc8c8 set-mc[ad]r!, inference, printing, tests for mpairs 2010-06-15 16:10:16 -04:00
Vincent St-Amour
ec799fb208 Added Channel types. 2010-06-09 14:54:35 -04:00
Sam Tobin-Hochstadt
78023d08f9 Sequenceof type.
- inferencing and subtyping relation with vectors, lists, etc
- use in `make-sequence'
- add tests
2010-06-09 11:03:12 -04:00
Carl Eastlund
3a525b9a12 Replaced unstable/hash with unstable/cce/hash. 2010-06-06 20:30:48 -04:00
Carl Eastlund
e52fb81aac Renamed bindings from unstable/hash and unstable/debug that will clash
with subsequent adaptation of (planet cce/scheme) to collects/unstable.
These bindings are temporary, and will be replaced in the adaptation.
2010-06-06 19:57:15 -04:00
Sam Tobin-Hochstadt
dbe9a0f997 debugging 2010-05-12 17:06:04 -04:00
Sam Tobin-Hochstadt
459a675b90 rename to rkt 2010-04-30 09:51:32 -04:00
Sam Tobin-Hochstadt
04f58cab86 Merge remote branch 'origin/master' into samth/new-logic2
Conflicts:
	collects/drscheme/private/insert-large-letters.ss
	collects/tests/typed-scheme/unit-tests/typecheck-tests.ss
2010-04-30 09:34:31 -04:00
Matthew Flatt
28b4043077 rename all files .ss -> .rkt 2010-04-27 16:50:15 -06:00
Sam Tobin-Hochstadt
f57ef37a66 Everything now compiles without names 2010-04-19 18:42:25 -04:00
Sam Tobin-Hochstadt
fca1044972 Merge branch 'master' into samth/new-logic2 2010-04-19 16:14:11 -04:00
Sam Tobin-Hochstadt
41e469d7ae Update structure types to have constructor ids.
Use constructor to generate better contracts for poly structs.
2010-04-14 15:06:14 -04:00
Sam Tobin-Hochstadt
d4e0c16d55 a new branch of the whole tree
svn: r18648
2010-03-27 14:49:58 +00:00
Sam Tobin-Hochstadt
65b12a2af3 Use `current-contract-region' appropriately.
Maintain source locations.
Fix PR 10776.

svn: r18421
2010-03-01 23:43:15 +00:00
Sam Tobin-Hochstadt
1616e27b4b fix comment, add test
svn: r18307
2010-02-23 21:36:53 +00:00
Sam Tobin-Hochstadt
f2ee3aa7b6 Fix bad hashtable type inference.
svn: r18284
2010-02-23 02:05:40 +00:00
Sam Tobin-Hochstadt
1039e68e03 New representation for free variables, now stored in struct.
Interning now merely used to create key, eq? not = for types.

svn: r18107
2010-02-17 00:09:38 +00:00
Sam Tobin-Hochstadt
90c8fcff11 Generate proper contracts for polymorphic struct types.
Document `Nothing'.

svn: r18074
2010-02-12 21:57:58 +00:00
Sam Tobin-Hochstadt
fcd4c4e38d Fix prop values for DrDr.
Add plt-responsible props.
Add hash-union to unstable.
Fix doc for compound-paragraph.
Fix unstable/scribblings/util.

svn: r16811
2009-11-16 13:59:13 +00:00
Sam Tobin-Hochstadt
fb29a2498e Move a bunch of functions from typed-scheme/utils/utils to unstable.
Add convenience lib for unstable docs.
Add char support to format-{id,symbol}
Add unstable/sequence library.

svn: r16789
2009-11-15 22:15:29 +00:00
Sam Tobin-Hochstadt
e14e58c8df hash table keys are contravariant, not covariant
svn: r15077
2009-06-04 14:38:59 +00:00
Sam Tobin-Hochstadt
c4762078e3 Remove lots of debugging code.
Use `needs-resolving?' in subtype.
Make resolve-{app,name} handle not-yet-bound names.

svn: r14890
2009-05-20 23:40:03 +00:00
Sam Tobin-Hochstadt
19c4aa6ba4 Sort unions on re-construction to make contract happy.
Use resolve-once more.
Improve `overlap', in particular use keys.
Resolve names and apps before doing structure comparison.

svn: r14884
2009-05-20 18:35:59 +00:00
Sam Tobin-Hochstadt
1047f7625d Handle ValuesDots in check-below.
Fix typo in valuesdots handling in values->tc-results
Handle ValuesDots in do-ret.
Don't try to construct silly wrappers for `apply values'
Don't use rest as list extension if it's #f
Fix tc-result handling for check-subforms/check
Add stronger contracts for Scope
Always generate substitution for infer/dots.
Fix type of `time-apply'

svn: r14815
2009-05-14 18:57:02 +00:00