Commit Graph

8 Commits

Author SHA1 Message Date
Neil Brown
902570f6cd Fixed inferTypes so that it infers mobile allocations when it should 2009-04-18 20:08:50 +00:00
Neil Brown
026eb737b6 Moved csTypeContext and csOperators to be StateT items in inferTypes, and moved the associated functions too
This is part of my plan to trim down what is in CompState
2009-04-17 19:05:42 +00:00
Neil Brown
3b1519e4d3 Fixed problems with passing MOBILE items to operators 2009-04-17 18:40:50 +00:00
Neil Brown
40fc118c31 Fixed an inappropriate use of type equality that was causing problems with operators that return arrays 2009-04-17 18:31:11 +00:00
Neil Brown
0f277365b5 Removed a big piece of commented out old code that was recorded by accident 2009-04-17 18:28:04 +00:00
Neil Brown
032e40f562 Corrected a bug where user-defined types involved with operators were not being resolved properly 2009-04-17 18:19:09 +00:00
Neil Brown
759bc06a53 Fixed the type inference for operators
The previous system followed Jim Moores' description, which turns out to not be how KRoC does it, and different enough that lots of existing occam code was failing.

The new system makes two changes.  First, if there is only one suitable operator, given the types (taking Infer to be a wild-card) then it uses that operator, and can usually settle any remaining Infers.  Second, it uses the type context to narrow down the operators to only those that have a matching return type.  These changes seem enough to compile a lot of the trickier types.
2009-04-17 18:01:17 +00:00
Neil Brown
aaf951fe67 Split up the OccamTypes module into OccamCheckTypes and OccamInferTypes 2009-04-17 14:11:44 +00:00