Commit Graph

12 Commits

Author SHA1 Message Date
Neil Brown
192ccd4e2c Extended the type unification for Rain to support type-checking things that are being poisoned (which could be either end of a channel) 2008-09-12 14:40:04 +00:00
Neil Brown
4429dfc051 Added Meta tags all over the place in the type unification to give better error messages 2008-05-20 18:42:20 +00:00
Neil Brown
1115364d47 Changed TypeExp to stop using Data.Generics (which was getting awkward)
Instead of storing the Constr, which was messy, we now store a String (to allow comparison of constructor types during unification) and a function to reform the type at the end of the type checking.
2008-05-17 19:44:45 +00:00
Neil Brown
ddb9ba2fd3 Corrected a bug in unifyArgs where errors that occur while processing arguments were being ignored 2008-05-17 19:42:49 +00:00
Neil Brown
1e6ae6bff9 Improved the error messages when the type unification fails 2008-05-17 14:23:00 +00:00
Neil Brown
f10cb7d525 Moved the TypeExp type out to its own module, UnifyType 2008-05-17 14:21:57 +00:00
Neil Brown
f8b7e8f8cb Added unifying-related items to CompState, and changed all the uses of ST to IO in the TypeUnification module
As part of this patch I also had to provide a Data instance for TypeExp (to allow CompState to still be an instance of Data).  Using IORefs is easier than STRef RealWorld, and puts everything in terms of IO (which is already in PassM) rather than ST (which would require more lifting).
2008-05-17 12:50:52 +00:00
Neil Brown
875cf4b40a Provided slightly better error messages from the type unification module 2008-05-14 12:18:58 +00:00
Neil Brown
e3bf321f33 Made the key type in the type unification generic (as long as it provides Ord and Show) 2008-05-14 12:06:11 +00:00
Neil Brown
e09fb2b9ec Added support for numeric literals in the type inference algorithm 2008-05-14 12:01:32 +00:00
Neil Brown
9f1d65f4a0 Added more tests for type unification, fixed some bugs and added cleaner error handling 2008-05-14 09:52:16 +00:00
Neil Brown
e3fa3df623 Added a module for doing type unification, and some very basic tests for it 2008-05-13 23:25:42 +00:00